Due to the Marlin version this repo is based on being older, it exhibits this bug when used against the latest PlatformIO core.
We have already discussed how to fix that marlin.py
script in for example
That is, just turn
into
for define in env['CPPDEFINES'].copy()