This is the true nature of water damaged phones. Sometimes they work again after a "drying" but ultimately, the water wreaks its havoc underneath the IC's and it eventually fails. The longer the water has been present, the harder it is to recover the phone.
In your case, you have a logic board issue, what it is exactly is hard to say. Depending on how much water got in, it could be very localized or it could be widespread.
What you need to do is full decontamination. That requires a sweep frequency ultrasonic bath and specialized chemicals with a final rinse in 99% pure IPA to displace all the water and corrosion (hence why it's important to do this early on). Only then is it worthwhile troubleshooting what the problem actually is.
So look for a repair shop (you can check my profile as one option) that does water damage and micro-soldering and they may be able to recover your phone/data. Sometimes water damaged phones cannot be recovered though so you have to decide if your phone is worth investing time and effort.