how is it decided that which panel should be on top of another ?

so theres 1canvas that houses all the buttons in the scene, like running and jumping and everything else
different scene has different buttons so every scene has 1canvas

there is another canvas that has a panel that houses buttons like go back to main menu, save the progress, load last save game, etc
these buttons are same no matter what scene user is in, so anotherCanvas has DontDestroyOnLoad function on it
and panel stays inactive in scene untill user presses back button and than panel pops up with save, load, exit buttons
now heres the problem.
panel does pop up but it stays behind buttons in 1canvas
so when user presses back button, save,load,exit buttons does appear, but jump,run buttons stay on top of them.
how do I make it right ?

It should be that the items that are listed in the hierarchy first are the first to appear, and each item listed after that should appear on top of it. So if your hierarchy says:
Canvas1
Canvas2
Canvas3

then the order they should appear in the game view is, Canvas1 in the background, Canvas2 in the middle, and canvas3 on the very top.

Is that what you’re asking?

Also you can always disable the conflicting canvas temporarily.

Have you tried modifying the sort order? If you put the back menu canvas as a higher sort order it should appear on top of the other canvas ex. game as 0, back menu as 1