It looks as if the HOA might be violating a local ordinance which was passed in 2005 and was specifically designed to prevent HOAs from banning the flying of US flags.
If their problem is that the pole isn’t part of the house, a couple of 2x4’s and some C clamps should remedy that.
wasn’t there a thread here a few months back. A high court decision that hoa could not ban US flags.
However, if you’re in a condo, everything outside the balcony, deck, walls is common area and under the HOA. They can probably ban flag poles and flags or anything else in the common area. Not my idea, but I think that’s the legalities of it.