a problem about shadowcatcher

I followed the first six minutes of this video(not use composure that he did)

Unreal Shadowcatcher realtime performant with Alpha Channel - YouTube

But when i follow his ,using “before tonemapping” ,the shadow semms like blur ,

then i use “after tonemapping” ,the shadow become right,but actor jitter with white edge.

I think very close to the AR shadow catcher. How should I modify it?

Does this method work in Unreal Engine 5.4? and in pathtracing mode?