It does not close the other screen

It still did not work out but thanks you anyway.(while switching screens it shows for milisec other screens or it jumps to the wrong screen.)
I also tried Close application problem: In multiple screen, when I go to another screen, then back previous screen and press EXIT button. But it is not working properly - #3 by Anke
Same results.

Will use second method hide and show the canvas's.

Here the link if u curios how the whole projects looks so far.(where the issue is appearing with the screens are not closing properly)