Check the setting of Form2’s
PopupMode property. It is likely set in a way that cause’s Form1’s window to become the parent of Form2’s window, which would prevent Form2 from moving behind Form1. The
PopupParent) property did not exist in D7, it was introduced in a later version to address z-order bugs that the VCL suffered from in earlier versions.
Read the following blob article for more details: