Are you saying that some of the mild steel transfers on to the screw and rusts which in turn causes a stainless screw to rust which otherwise would have been fine?
Only the head of the screw but yes. Only really matters if it’ll be visible. Basically the tiny amount of non stainless left on the heads can and will rust making it look a bit shit. It's not going to cause any issues beyond aesthetics.
And make sure you use a stainless screwdriver. As they’ll get contaminated and rust anyway otherwise.