I suspect that as I got more vocabulary (and more languages) and started to actually speak the language more, I remember the "sound" of the word where I used to remember the spelling before. Like "it's" and "its" wasn't a problem before, but now I catch it somewhere in the text. At least I consistently write more than 50% of the articles nowdays. Languages are weird.
While I was writing the reply, I considered giving the absolutely exact same explanation, which I agree with, down to the example you gave.
Two examples in portuguese that always trip me up, and absolutely never used to before are (i) "voz" (voice) and "vós" (you); and (ii) "trás" (back) and "traz" (bring).
I also do a lot more code-switching.