I do wonder why your friend couldn’t tell you that you already had the perfect translation for ‘Don’t be like that’ — it is:
Sei nicht so.
So is the perfect, idiomatic and complete translation of like that. Yes, it may seem weird that two words are translated by one word, but some things just are like that — ‘Manche Dinge sind so.’ For completeness, here are a few more examples:
If he carries on like that, he’ll never learn.
S’il continue comme ça, il n’apprendra jamais.
Wenn er so weitermacht, lernt er es nie.
Take a look, I’ll show you again. You do it like that.
Voyez, je vous le montre encore une fois. Vous le faites comme ça.
Schauen Sie her, ich zeige es Ihnen nochmal. So machen Sie es.
He who drives like that must have a guardian angel.
Celui qui conduit comme ça doit avoir un ange gardien.
Wer so fährt, muss einen Schutzengel haben.
I’ve seen Hubert write this phrase in different variants a few times in recent answers and it fits here well: Remember that you never translate words but always meanings.
render
->translate