We open a new form through showdialog() from an existing form & trying to open another form by clicking the button from it & the showdialog (2nd form) will be closed. The form which opens on the click of the button(3rd form) hides behind the 1st form. Attached the demo link for your reference. Please check and share your inputs.
Demo Link : https://drive.google.com/file/d/1RRJjmiMu1gwE-E-IwrTlKgyEGit-LNfN/view?usp=sharing