Like this maybe, I tested it very briefly, seems to work ok. You will need some kind of interpolation here, or at least camera lag set to something lowish - 5 or thereabout:
https://forums.unrealengine.com/core/image/gif;base64
edit:
I assumed you want to restrict camera movement rather than mouse cursor movement as this would be annoying for the end user.