Flickering shadow artifacts in UE4 (4.26), which are not present when opening the project in UE5

So here’s a video of my issue: Flickering shadow artifacts in UE4 (which are fine in UE5) - YouTube

It’s like the shadows are going through the objects, but I tried changing the shadow bias and it didn’t help at all.

I originally made the project in UE4.26, but just out of curiosity, I opened a copy in UE5, and guess what, it works as it’s supposed to. I didn’t change any paramater in UE5 (not using Lumen either). Problem is, there are many errors and glitches in UE5, so I have to stick with UE4 for this project.

Anyone have any guesses what can cause this problem?
Thank you!