This cannot be done with current Animation Rigging.
For this to work, you’d need for the constraints to apply before the physics system evaluates and provide new velocities to the kinematic rigid bodies in order for them to adjust to the environment.
If you look at the execution order in Unity (Unity - Manual: Order of execution for event functions), you’ll see that the physics system evaluates before ProcessAnimation is called. This makes it hard for both systems to share data outside of root motion evaluation.
We’re working to make things like this possible in the DOTS framework with customizable Animation passes and expanded access to physics in constraints.