You should be aware that the factory- the boat builder, installs the exhaust system not Yanmar and many are marginal. A good exhaust system should have at least 12" of clearance above the water line to the the top of the lower wall of the riser; ie the spill over height. It also should self drain.
Yours may be low and it probably doesn't self drain.
It looks like you have plenty of room to extend the riser upwards. Get some dimensions and post here. You will need the water line clearance and the distance from the top of the riser to the bottom of the engine hatch.
I can help with designing a better exhaust system that solves both problems as I did this on my Mainship Pilot 34.