how to prevent sprite from flipping, when using transform.right

Your title is about movetowards and your question is about rotatetowards.
Tbh, for both the easiest method would be setting the unwanted component to 0.

Vector3 rotate = Vector3.RotateTowards(rb.velocity, input, maxDegrees * Mathf.Deg2Rad, Mathf.Infinity);
rotate.y = 0;