GUI Elements not properly overlapping, even with proper Z indices

Godot Version

Godot Stable 4.6.2

Question

So I am having a problem with my Solitaire game, where it just doesn’t want to behave properly when dragging cards. After suspending embedded project, I found that while the cards do have the correct z index values (i.e., the 6 of spades has a Z Index == 2 and the 5 of diamonds has a Z Index == 3), I still drag the 6 of spades when my mouse is hovering over it even when there is an overlapping card.

I’m not sure why this is happening, but if anyone could help out that would be appreciated! Thank you!

z_index only affects the order in which nodes are drawn, not the order in which they’re processed or receive input. If you want to change the order they receive input in, you’ll need to change their order in the SceneTree (see move_child and move_to_front).

Thank you!