I have this exact same problem and solution I found somewhat unsatisfying. I set input mode to game and ui whenever LMB pressed in tick. I hope this helps but I believe this going to cause other problems of its own in the future. Also reason is whenever LMB pressed input mode is set to game only by default in ue.