I'm uncertain what you're asking. Is the window failing to automatically go up or down, when fully pulling up on or depressing the power window button? There is a "reset" procedure for fixing this when it isn't working properly, such as after having disconnected the battery's cables.
In the 2022 CX-5 Owners Manual, see p-325 through p3-37: Power Window Switches
Perhaps the "Power window system initialization" procedure will correct the problem:
If the battery was disconnected during vehicle maintenance, or for other reasons (such as a switch continues to be operated after the window is fully open/closed), the window will not fully open and close automatically.
The power window auto function will only resume on a power window that has been reset.
Switch the ignition ON.
Make sure that the power window lock switch located on the driver's door is not depressed.
Press the switch and fully open the window.
Pull up the switch to fully close the window and continue holding the switch for about 2 seconds after the window fully closed.
Make sure that the power windows operate correctly using the door switches.