Enhanced input and SetInputModeUIOnly issue

Hello everyone,
I am continuing to explore Enhanced Input, and I have a question.
There is InputAction:


There is InputMappingContext:

When Triggered, I create a widget, and when Completed, I destroy it:

However, in this widget, SetInputModeUIOnly is set during Construct, and because of this, my InputAction calls Canceled:

How can we ensure that when creating a widget, the player cannot move, the mouse is visible, and InputAction works correctly?

Thx..