How to prevent my click to imgui menu also being received by the actual application

I successfully complied an imgui menu into dll and injected it in a D3D11 game.
I successfully call out the imgui menu, but when i click on my imgui menu, my game itself will also receive this click input.
Is there anyway to prevent this interference? So that when i click my imgui menu, only my imgui menu will receive this mouse event instead of both imgui and the application itself will receive it.
Thanks in advance.