Python 3.11 IDLE & Interpreter not working

I had both versions 3.10 & 3.11 installed on windows 10. Python 3.11 IDLE & Interpreter not working when opened with windows run dialog box command. It disappears immediately. System variable path is also set for version 3.11.
It works well for version 3.10 Moreover when run dialog box commands are used to open interpreter and idle of version 3.11 the version 3.10 interpreter & idle opens.

What exactly do you type into the run dialog when it works for python 3.10 and the fails for python 3.11?

One can start IDLE from Command Prompt with py -3.10 -m idlelib (or -3.11). Or start from the IDLE entry under Python3.x in the Start menu. If you right click on a .py file and Open, you run it with python directly and IDLE is not involved. Python quits when done execution. Edit with IDLE, though, should work.

I typed: python -m idlelib in the run dialog box. It works and idle of version 3.10 opens instead of idle version 3.11
I haven’t set path for version 3.10 instead I set the path for version 3.11 in the system path
Moreover, python -3.11 -m idlelib does not work.
I uninstalled both the versions and installed only the 3.11 version but still it does not work

What do you mean by the run dialog box?

Which version runs with py, no version specified, depends on which version you last checked as the default version when installing. Setting the path has nothing to do with the behavior of py, only whether python works. If you have multiple versions installed, python can only run 1 version, which is why it is semi-useless and not recommended for multi-version machines.

I assume this is the dialog that comes up when you press WindowKey-R.

When I enter the search term ‘idle’, I am presented with a choice of the IDLE’s installed on my system. Clicking any runs IDLE with the corresponding version of Python. No command is entered, no should one be. OP description is inadequate for me to know what actions lead to a problem.