EDIT: As additional info for people that might wonder about this in relation to autism - at least in my case I am fairly certain it is not connected, but a comorbitity of migraines (which in recent years I have had much more rarely, but I still often have the visual aura that comes with them, but without a headache - which I found out is something that isn’t uncommon to happen with age)
I have a similar phenomenon sometimes when looking at white/bright surfaces and/or in (almost) total darkness, I think it’s this: https://en.wikipedia.org/wiki/Visual_snow_syndrome?wprov=sfla1
EDIT: As additional info for people that might wonder about this in relation to autism - at least in my case I am fairly certain it is not connected, but a comorbitity of migraines (which in recent years I have had much more rarely, but I still often have the visual aura that comes with them, but without a headache - which I found out is something that isn’t uncommon to happen with age)