Rotate Sprite2D to it align with slope floor angle when going up and down slope

I’ve searched a lot on the internet and haven’t found anything useful so far. I have a 2D character body from cutouts, as the feet are Sprite2D nodes. The idea is that the character’s feet should stick to the floor when going up and down on slope. I managed to partially figure it out, it only works when going downhill, it doesn’t work when going uphill.

First image from the left bad rotation then second image no slope ok, and third image when going down as you see shoes rotation ok:

here is the code snippet i used:

func physics_update(delta: float) -> void:
           if player.is_on_floor():
		       if player.get_slide_collision_count() > 0:
                        #collision = player.get_slide_collision(0)
			            #normal = collision.get_normal()
                        But_L_spr.rotation = player.get_floor_angle() 
			            But_P_spr.rotation = player.get_floor_angle()

                        # But_L_spr and P is Sprite2D shoes

Maybe someone had a similar task, best regards