Aftereffective photophobia is not a compulsive behaviour.
A person with agoraphobia is characterised by an inability to concentrate and an uncontrollable tendency to look at the person or object next to them with their afterglow, a process that is similar to compulsive behaviour in that the person has difficulty controlling looking around them on their own.
The difference between compulsive behaviour and obsessive-compulsive behaviour is that compulsive behaviour is a repetitive behaviour, a ritual action or a mental ritual that occurs repeatedly, that the person succumbs to or fights against compulsions in order to reduce internal anxiety, and that it is meaningless, excessive and often follows a strict and specific rule set by the person themselves (e.g. washing according to a specific procedure, checking a specific number of times, etc.), whereas in afterglow phobia the behaviour is are not based on obsessive thinking, but rather on looking around with the afterglow to alleviate the anxiety caused by the fear of being noticed and judged, and are often accompanied by active avoidance behaviour.