Strange ImageButton behavior - moving from mac to windows

Hi, I’ve moved a vst3 juce project from mac to windows using visual studio 2022. Everything works fine on mac, but on windows my imageButtons behave very strange. The error scenario is this:
I click button once and it transform to “on image” and the UI and functionality change like it should. If I click the button again - it should set to off image… - nothing happens. But if I physically press the left mouse button down hard it works. I didn’t know a mouse has a pressure parameter. Also if I click outside the component, where the buttons is contained (a child), and then click my button again it works. I’m testing using ableton live. And if I click somewhere in abletons UI and then back to my button - it works. Also if I switch between windows - let say I have ableton and a web-browser open - I switch back to ableton - and the button works as it should.

This is very strange. I’m not sure how to debug this. I have tried another mouse - same result.

On mac I used xcode/juce 6.
On windows juce 7, visual studio 2022 (without Resharper c++).

Any help is much appreciated.

I kind of solve the problem here. I have a class that inherit from ImageButton. All my created imageButtons use this class.

In my class I override mouseDown(const MouseEvent& event). Deleting it from class solve problem. And it was not my code inside the overriden function that caused the bug.