Is the grammatically correct to say "Being not happy" instead of "being unhappy"? I have tried to search the Internet, but I did not find an answer.
Generally speaking, it can mean the same thing - but it is not strictly equivalent, as deadrat pointed out. Peter Shor made a fair observation, through which i think OP asks for the antonym/lack of happy/happiness, in the given context.
Reading your comment about how you'd like to use it, bear in mind that unhappy (e.g. displeased and even sad, maybe), and not being happy (neutral, open to further exploration) are two different things.
Tread carefully; I'd advise using unhappy for displeased emotions. Using "not happy" is somewhat correct for this purpose, but not completely, as it can also mean neutrality, so don't do it. Or rephrase it - that could shed light on your intended meaning, and what you are trying to describe better.
"Not happy" is just an emotion other than happiness. In common usage, it would more often mean angry, rather than sad. Whereas "Unhappy" is a synonym for sad.
At a funeral you would be "unhappy". You would never use "not happy" in that context, as that would be stating the obvious.
"Someone parked in my parking spot! I'm not happy!" would typically mean I'm angry, rather than "unhappy" (sad).