Try this (you will need two helpers):
1. per David, check the fit of the frame to the body without hinges and swing arms.
2. Install hinges loosely.
3. Install swing arms, and lock down.
4. Have the two helpers (from the outside of the car) put gentle pressure on the frame so the gasket is evenly seated top and bottom and both sides. (fix swing arms if necessary) Then tighten the hinge bolts, frame first then to the body.
In theory the gasket will now seat with the frame closed and the swing arms locked.