The out-of-state transfer prohibition is federal, not state. Selling privately to an out-of-state buyer (or vice versa) is a federal felony.
Via the ATF:
How may an unlicensed person receive a firearm in his or her State that he or she purchased from an out–of–State source?
An unlicensed person who is not prohibited from receiving or possessing firearms may purchase a firearm from an out–of–State source, provided the transfer takes place through a Federal firearms licensee in his or her State of residence.
[18 U.S.C 922(a)(3) and 922(b)(3); 27 CFR 478.29]