To complete the answeranswer of DivieriettiDiverietti and the commentcomment of Roy Smith, here is a statement which might interest you:
Theorem If $X,Y$$X$, $Y$ are varieties over a field $k$, assume $X$ is smooth and $Y$ proper containing no rational curves. Then any rational map $X\dashrightarrow Y$ is everywhere defined.
You can find that statement in Debarre's book Higher Dimensional GeometryHigher-Dimensional Algebraic Geometry, Corollary 1.44 p.31 31.
In particular, if $X$ is smooth projective and contains no rational curves, then its automorphism group is equal to the group of its birational endomorphisms.