As I see it, there's nothing offensive about "do better" - it's just asking the person to not repeat the same (ostensibly misguided) thing they did before.
On the other hand, there's Kratos's “Don't be sorry, be better”, which did hit me hard when I reached that part in God of War 2018. That one hit me on a very personal level.
"Do better" when used in an online debate forecloses discussion. It implies that the one saying "do better" is the authority on what "better" is. What if I disagree?