When you write you need to be at least competent with the grammar of the language you write in. That’s kind of assumed, but it’s amazing how many amateur writers don’t take that bit seriously. They don’t give a shit, and they don’t bother to learn the rules at all.
After all, writers break the rules all the time. If you are relying on reading Cormac McCarthy for learning the punctuation rules of dialog you are shit out of luck. Cormac doesn’t even consistently use quotation marks, let alone any of the other rules around dialog, and his dialog is some of the best in the business. Here’s the thing, whatever else he may be, he’s a genius (and I will never forgive him for The Road). If I had his talent, his facility with story, with language, I would pick my own rules too. Here’s the thing though, I don’t. I’m not terrible, but I am not that level of writer, and because of that I have to pay attention to the rules, consistently.
Breaking the rules is a factor of knowing the rules. If you are extremely comfortable with the rules of grammar and you choose to break one of them for a specific reason, then you should do it… but you have to already be comfortable, even expert. That way when you break the rule in a specific, and calculated, way you are doing so for effect, and that becomes clear. If you are breaking the rules simply because you don’t know them that will also be clear.