Which FAA or EASA regulation does prevent a high wing to cross the passenger compartment?
There is no reference to such a regulation in the design reference books that I have. As I remember, in the F27 the high wing did make the passengers tuck their head in when walking to the rear seats: the wing does cross the fuselage, which makes for a much lighter construction than when placing the wing on top of the fuselage.

Image source

There is also no regulation stating a minimum height between floor and ceiling.
There is statistical data on average passenger length, and design departments of aircraft manufacturers are very much concerned with passenger appeal. So they may be instructing the construction department that the wing must be placed on top of the fuselage, despite the weight penalty, in order to increase market share. Populations are getting taller over time.