It depends. If the city is running the Fourth of July festival in the park and yes it’s unenforceable. If there’s a private organization leasing/renting the property then it is enforceable. You could be asked to leave if they see your firearm.
IANAL, I "believe" that if it's city sponsored then you are correct. I also "believe" that if they rented the park out to the say, Rotary Club, and they are sponsoring it then their event their rules.