Player doesn't stick to moving walls

It’s a property of CharacterBody2D. You can find it in the inspector.