How to fix camera going through skeletal mesh (solution)

So here’s the problem I’m having. The player camera doesn’t go through walls, but it does go through the skeletal mesh.
Demonstration:


I decided to see how it was done in Silent Hill 2, which is also on UE 5.
Demonstration:

And I understand that this can be solved by simply hiding the skeletal mesh when the camera is very close to it.
Demonstration:

Here are my blueprints of this solution: