We are sorry to hear the flap is not staying closed on your dog's Freedom Aluminum Patio Panel, David!
Based off what you have described, this does sound like it could be a height issue for the flap. As long as the magnets are able to maintain good contact, they will hold together in most situations unless a great force is applied to push them out of place. If the magnets are only making the barest of contact, then this hold will be much easier to break.
Please try to adjust the height of your flap so that it is low enough for the magnets to make consistent contact but not too low to allow the flap to bow out. If you continue to experience issues despite making these adjustments, please feel free to reach out to us at 1-800-732-2677 for additional assistance.