I haven’t finished learning the matter, but it appears from Shach on Shulchan Aruch Y.D. (190:27, S.K. 37) the words of the S.A. are based upon a scribal error in the Ramban, and are against the Gemara. How come the Beis Yosef didn’t think twice?
The Gra idem says:
וכן אם כו’, טעות הוא דזה לכו”ע טמאה כמש”ש בגמ’ ועש”ך
The Achronim seem to elegantly dance around the issue.