Never mind, I figured it out. I was just misunderstanding how y-sort works in Godot 4.
Basically, the "Y Sort Enabled" option doesn't tell a node to let itself be y-sorted, but rather to y-sort its children. I had it enabled on the player and object, so Godot was just y-sorting their sprites based on their own positions instead of the parent nodes' positions.