Button component swapping problem

hello. I’m wondering if anyone has any advice on this problem I’m experiencing:

I have two instances of Button components in my application and I’m swapping the buttons on the fly by using

buttonInstanceName1._visible = true;
buttonInstanceName2._visible = false;

Since the Buttons are in the exact same location, and they are of the same size, this swaps the two buttons and their functionality. However, I’m experiencing a problem where if I keep my mouse perfectly still while the swap takes place, then buttonINstanceName2 doesn’t receive the event that a mouse is hovered over it. If I click the mouse button once, then the “over” state is triggered, and it takes two clicks to actually call the Button click event. If I mouse my mouse by one pixel before clicking, then the “over” state is triggered and I can proceed as expected. It’s only when the mouse remains perfectly still.

To make the situation even more strange, this only seems to be happening on one swap. If I swap back to the original, then the button correctly receives my click on the first try.

Any ideas on how to fix this, or a hack that might make it work the way I need?