unity – Make a child sprite match the layer ordering of its parent

I have my project settings set up to order the sprites’ visual layering based on their y position.

If I add a sword as a child to my character, the sword won’t have the same order as the parent so things can look like

Sword --> enemy--> player

instead of

enemy --> sword --> player 

(because I want the sword to be in front of the character)

I thought of setting the pivot point of the sword sprite so when nested inside the parent sprite, it would be around the same height as the player’s pivot point so they would have the same order. I feel like this wouldn’t be the best solution because when I will animate the sword to attack, I wont be able to rotate it around the position I want…..unless I make it the child of an empty object?

How can I solve this issue?