For which exact board are you compiling the project from the available targets? Which board do you have? When you follow the definitition of RED_LED from the main.cpp, what is it defined as?
You meant build_flags there?
can you upload the log of pio run -v -t debug? Because as seen here
Flags should be -O0 -g3 -ggdb -gdwarf-2, not containing -Og. Have you updated all your platforms using pio platform update?