When you put in in gear , does it clunk just once with each shift, or continue to clunk. At 1st you indicated it would do it even when shifting out of gear then you emphasized going into gear. Does it really seem to do it shifting into neutral? That would be odder.
How confident are you it is in the engine?
Alien and Bruce compiled a very good list of potential suspects..
Adding loose prop nuts with prop backing off & fwd,... worn cutlass, loose shaft , rudder or tab anode , ... and
could there be something fouled in the prop or shaft hitting the hull?
Maybe even a thrust bearing in the transmission?