Actually, the problem doesn't come from the Y-axis remainder, but the parameter floor_max_angle doesn't seem to work correctly in the function move_and_slide_with_snap and move_and_slide