Input for left mouse click not always working

Hello,
I have a game that implements the left mouse button click as a firing event. While the button is pressed, it should continue to fire projectiles until it is released. Then, when the player looses all hitpoints, a death animation plays and a “Game Over” menu pops up with options to restart the game or quit the level.

It’s when I restart the game that the issue starts. I can hold down the left mouse button and fire after restarting the game, but if I let go of it and then try to press and hold it again, it doesn’t work. I noticed I can only get the “gate” to open if I double click with the left mouse button and hold. Does anyone have any suggestions as to why this is happening and how to address it?

Attached are my blueprints for the Firing event in my player pawn and controller class, and my restart button for the menu.

Pawn Class

Controller class

Game Over Menu

I’ve encountered a similar issue when regaining control of the mouse. Try adding a SetFocusToGameViewport node after changing the input type. Cheers!

Thank you for the advice. I think I found a different solution by following this tutorial on paused and main menus: Unreal Engine 4 Tutorial 15 - Creating a Main Menu & Game Over Screen [1/2] - YouTube

From what I could find, the issue had to do with a part of my level blueprint where I was switching the input control to the menu only and the Set Show Mouse Cursor was somehow interfering with the input when I selected restart. I was able to get it working by using the following in my level blueprint:

And removing the Set Show Mouse Cursor and Set Input Mode Game Only from the Game Over Menu (from my original post)

I should also state I had to add the following to my Player Controller class to make sure the input is set correctly