Mouse Control for ui and player same time

Iam trying to make a puzzle: the player need to control the character when the player in pause screen. I got everything works except mouse movement (player look ). I wanted to use mouse for player look (2Dxy) and Ui control at the same time.

when i using “input mode game and ui” - I can’t control the player look

when i using “input game only”- I can’t use the ui buttons.

is there a way to do this?