Hi there and welcome
It is very likely the logicboard or screen has been shorted out and this is why it keeps dissapearing. They are not made at all for water.
Your best chance though and you should do this with any electrical device that is submerged in water, is to turn it off and put it in a bad of rice for 48 hours.
This will suck out all the moisture from the phone.
Once 48 hours is complete, take it out and turn it on and see if it then operates correctly.
I strongly urge you to not use it until you have done this.
If the problem does persist, you would need to take it into an Apple store where they will dismantle it and see which component has shorted out.
Before they repair it, get a pricing first as it can exceed the cost of a new phone if multiple components have failed.
If you would like any additional information or assistance, please do not hesitate to let me know.
Else if you can take a second to rate my service by clicking one of the stars at the top of the screen then submit, that would be greatly appreciated.