How to lock character "pitch" rotation?

I made a blueprint that allows me to toggle between “walking” and “flying”.

However, I have an issue with “flying” state that I can’t figure out how to fix. I would like the character to not roll over when I move the camera up or down. It causes camera to glitch in flying mode.
Here’s what I mean:

How do I lock the “pitch” for the character in “flying” mode?