If this window is really in the wet area the best thing you could do is remove it totaly.
Windows in a wet area is never a good idea and will be an on going issue.
If there is no roon above this area a simple to install solar tube would light up the room and not cause all the other issues.
If you insist on having a window concider installing a transom window at the top of the wall up high enough where direct water would not be an issue.
Still going to keep a window then use a vinyl double glazed and use all vinyl trim.
Where they messed up installing that trim is they tryed using base board for the jambs instead of making jamb extentions that came out even with the wall.
Windows in a wet area is never a good idea and will be an on going issue.
If there is no roon above this area a simple to install solar tube would light up the room and not cause all the other issues.
If you insist on having a window concider installing a transom window at the top of the wall up high enough where direct water would not be an issue.
Still going to keep a window then use a vinyl double glazed and use all vinyl trim.
Where they messed up installing that trim is they tryed using base board for the jambs instead of making jamb extentions that came out even with the wall.