Most “writing code” is about solving extremely simple mathematical problems. “Knowing what code to write” typically is the harder part, and that is about communicating with others.
On the other hand, spelling and grammar need not be perfect to communicate well. I think you’ll lose good candidates (for example dyslexic ones) if you put too much importance on them.
To be fair, I used to work with a dyslexic CEO. He naturally had someone proof read things before sending them out, knowing that poor attention to detail is a guaranteed way to get your communication ignored by a potential customer.
A resume and cover letter should be proof read in the first place, so I'd consider this failing just as bad as, or maybe even worse than many of the other observations here in the comment section.
A senior anything knows how to represent themselves appropriately and at a senior level.
On the other hand, spelling and grammar need not be perfect to communicate well. I think you’ll lose good candidates (for example dyslexic ones) if you put too much importance on them.