Sounds like a vapor lock, except I donít think Diesels are susceptible to vapor lock.
I would first start with valve adjustment. Contrary to popular belief, valves wear tight, and valve clearance goes away when hot, too tight, means leaking valves and low compression
Plus it likely needs checking anyway and doesnít cost money
I like to start with easy and cheap
first, before advancing to hard and expensive with trouble shooting.