Since you said the engine was ok on the dyno, it is most likely the external plumbing.
Put a pressure gauge on both lines at the block. That's two gauges. One gauge will read higher than the other. The higher gauge is the
oil coming out of the
oil pump. It is quite possible you will find the pressure there is exactly what is was on the dyno. I'll guess it was 50. If you have 50 coming out of the engine and only 25 coming back to the engine, then you have the proof that the plumbing is creating a 25 psi pressure drop, from resistance to flow some where, and that there is nothing wrong with the engine.
On the other hand if you have 25 psi on both gauges, you have proof the the plumbing is not the problem and that the problem is indeed somewhere in the engine.
This will at least let you narrow the search. Prove this first! Everything else is a guess.