Banning on single player would be silly. But GTAO is another story. It's designed as a cash farm. You have to grind missions, buy shark cards or use cheats. So as I understand they will ban anyone if they detect it's using mods/cheats. But GTA anti-cheat systems are weak and sessions are P2P or at least were.
I don't personally play either game, but from what I've come across on the subject over the years, publishers seem to be a lot less difficult about it today compared to a few years ago. I recall reading about them denying a ban was due to mod use when they were wrong, being ridiculously vague about what modding was and what wasn't allowed, refusing to fully restore a player's character even after a ban was rescinded, etc.
https://www.pcgamer.com/gta-online-players-report-multiple-u...
https://www.reddit.com/r/pcgaming/comments/g139nu/eas_volunt...
Interesting edge case: https://www.pcgamer.com/gtav-modders-reportedly-banned-for-c...