Hello Deni,
Gray flags are not actually markers, they indicate the positions where marker projection could be put, according to the marker position in 3D (based on other projections).
Without manual pinning the marker projections switching them from gray to green you can only use Python scripting for the automation.