Here is my process for getting a good depth pass from UE5.4, which can be used in previous versions of UE, to After Effects using the World Depth Pass. Hopefully this helps you out. Also, I'm including a link to ProEXR if you don't already have it down below.
https://www.dropbox.com/scl/fo/6dx5k8...