And if we go for the logic than it cannot be real because it's not a main game , then all that we know about the characters and their personal traits in deep sigh is false and everything would be very very boring.
I don't think you understand the nature of a spin-off in terms of any fictional universe.
Spin-offs are non-canon, but as insight to the character's personality, they are relevant. They are merely "what-if" scenarios.
For example, although Mario Tennis: Ultra Smash is non-canon, it does show us how Rosalina would be if she did play tennis. It's not something she ever actually does, but it shows us how she would play if she did.
This isn't debatable as it's the literal definition of the phrase "spin-off".
There can be canon spin-offs in media, and these have a separate name, called "tie-ins". As an example, pretty much any Kingdom Hearts game on a handheld is a tie-in - the events in them aren't quite as major as in the main games and they try very different things with the gameplay, but they are all mandatory if you want to understand the full picture of the story.
The only exception to the rule is Rosalina. Ironically Rosalina displayed all her true character in a Main game ; and when she started appearing in spin off games, she acts like a generic character and sounds like one considering that , since the Mario cast don't talk much their voice is the only ''iconic'' thing they can have that represents their behavior and true nature and Rosalina lost it ; When you hear the deep trademark voice in Mario Kart, you'd know that Rosalina is biting your toes , and now you cannot even take a guess without looking behind.
Nah, that isn't true. There's far more things to examine in characters than just their voice, even in Mario characters, that defines their personality and who they are. It's your own fault if you can't see that but it makes your observations on Rosalina's character here very flawed. There are other things to examine like their body language, how they react to certain things, how they use their abilities, how much resourcefulness they show, etc.
You are segregating her actions in main series games from her spin-off appearances. When in actuality, they form a collective whole of a character. Although the spin-offs are non-canon and don't actually happen, they show us how these characters would act if they were put in these situations, like karting, sports, board game parties, etc.
In Rosalina's case, there has rarely been contradictions or discrepancies in how Rosalina acts in spin-offs compared to main series games. The only one that had serious, out of nowhere contradictions was Mario Party 10 (3D World and Smash technically do too but that's more to do with her size and only using limited amounts of her powers, but those are understandable since it's done to make her realistically playable without breaking the game too hard). That one had her acting scared of stuff, being overly excitable at little things, etc. That one reduced her to be a bit generic, but that's because that game was designed to over-glorify Bowser and under play all of the other characters, so it wasn't just Rosalina that was negatively effected, a bunch of characters were OOC in that game. I don't think it was a good move, especially since it contradicted certain bios about her that went up around the game's release, but it's only one instance so far.