Without seeing it, I would suggest detecting when the player is allowed to wallrun, then however you control starting the wallrun, set a flag. Using that flag, you can have the player “stick” to the wall, ignore gravity, whatever you need. When you reset the flag, it will go back to how it was before.
I can offer more detail or suggestions if you post a screenshot showing what you’re trying to achieve, as there’s many way to do this depending on how your game is designed. I’m in the middle of a 3D platformer and we do something similar for climbing. We ignore gravity and play the wall animations when the flag is set, and the player snaps to the wall