Security guards are underpaid and undermotivated, and usually stuck in a portacabin at the front gate. Also, for insurance reasons, they’re usually not allowed inside the buildings, they just have to patrol around the outside.
So usually I work out a way around the back, avoiding their obvious patrols, and into the building – once inside you’re sorted. Yes, flash is a bad idea usually – besides, light painting usually produces better results.
they have no legal right to do that unless you were causing an obstruction.
Point this out to them and they just charge you with causing a Breach of the Peace. Or suggest you’re acting strangely and this gives them grounds to search you for drugs.