So, the move and slide function has this signature:
move_and_slide_with_snap ( Vector2 linear_velocity, Vector2 snap, Vector2 up_direction=Vector2( 0, 0 ), bool stop_on_slope=false, int max_slides=4, float floor_max_angle=0.785398, bool infinite_inertia=true )
What you basically need to do is set the “stop_on_slope” to be equal true, the max angle is in radians and the default value is 45º. if it still messes up with the jump, I’d say you are better off making your own “is_on_floor” function using maybe another area2d and/or raycast2d (if you do use raycast2d remember that they are not enabled by default) to generate it, then you can tweak them to have the desired result (if you only want to enable jump if the floor is rotated less than some deegree). The area can detect if there is ground below the player and the raycast can detect the angle of the ground (the normal vector of the collision)