Here is how the flashing looks, and how it's fixed if I put my animation code (only css) in project settings instead.
Seems like a loading priority issue, but not sure how to solve it without project settings. My fix is more like a band-aid fix anyway, not a proper one.