Engine overheating
I had the same problem on a previous boat with a yanmar engine exactly like yours. I checked EVERYTHING except the mixing elbow. And that was where the problem was, sort of. Specifically, the fitting at the top of the elbow connected to the raw water hose coming out of the heat exchanger was plugged with scale.Only a small opening was left inside this L-shaped fitting (it is threaded into the elbow).At low rpms the opening was large enough to allow the water to flow out of the heat exchanger into the elbow. At higher rpms (> 2500-2800) the hole was not large enough to allow all the water to pass through. Back pressure in the hose to the heat exchanger built up and the flow out of the heat exchanger stopped and the engine overheated. One time the pressure got so large that it blew the hose off of the connection to the heat exchanger on the top of the engine. What a mess. So, just remove the hose at the fitting on the heat exchanger and make sure it is not plugged with scale. Simple to do and I am pretty sure it is a common cause of engine overheating under the conditions you describe. BTW, it is a good idea to add this to an annual engine inspection. If your engine is more than years old you probably have scale there even if it isn't part of the problem.