A version of OP's claim (with an additional hypothesis) is mentioned in a footnote on the first page of "Injective Endomorphisms of Algebraic Varieties" by A. Borel, who mentions that M. Raynaud proved the following:
If $V$ is an algebraic variety, $f: V\to V$ has finite fibers, and is an immersion on a dense open subset of $V$, then $f$ is an isomorphism.