Try turning it off and on again making sure that no buttons are pressed. If it still boots into safe mode, you may have a short (or water) in the buttons and these may need to be replaced.
I think that the screen itself is not locked to the device however the home button is so you have to carefully swap this part so that each button stays with it's respective iPhone.