............
They claimed all diesels had a sweet spot and that the engine liked to run below 2000.
............
WADR, for our engines (I have an M25, yours is the M25XP, essentially identical except for 3 extra HP and the bigger HX), that statement is nonsense.
My WOT is 3000 rpm, and yours should be, too. I run anywhere between 2400 and 2650 usually, and on our trip up the west coast in 2016 from SF to BC I ran at 2800 for days on end.
As others have suggested, it would be helpful for you to do some investigation on your own. Get a friend to drive your boat and spend some quality time down below listening, using the techniques suggested here by others.
In reading your comments here, I kept internally reacting to your repeated "...my mechanic said or did..." like fingernails on a blackboard. Maybe it's just me, but having someone else work on your boat also requires that YOU know what he's doing. IMHO, the only reason to have someone else work on your boat is if you're unable to physically perform those tasks. If you can, learn how to do so, it might save your bacon when your "mechanic" isn't available, like when you're out cruising. I've had "others" work on my boat twice (in the past 25 !!! years). In both cases, I've had to fix their "repairs." I learned to do my own work. You can, too.
One other thing: that noise could be your prop. Have a prop shop look at it with a short haul. Experience indicates that a little feathering of the edges of the prop can make the noise disappear.
Good luck, please keep us posted.