A lot of people wonder how Miley was able to fool everyone into being a different person when all Hannah really is is essentially Miley wearing a costume, meaning their faces look similar and someone could spot this. But it's not impossible, surprisingly, there are many cases of famous people hiding in plain sight and people non being the wiser. For example, there's a story this troper heard that Dolly Parton, Miley's in show and real life god mother herself, she once entered a Dolly look alike contest for fun, and she lost to a drag queen in costume, and there was another story where Hugh Jackman had attended a convention donning his full Wolverine gear, only for a fan to tell him he was wearing a crappy cosplay.
This is actually shown in the show itself: due various events where Miley sang in front of Rico, who promptly used the looks and singing voice to deduce she was Hannah Montana... And then promptly dismissed the idea.
In the show and the movie, Miley lies about stuff in almost every episode and never seems to permanently learn anything from it. This is probably because from the time Miley was about 12 years old she's been encouraged to lie about having two identities.
Essentially, she was used to always finding a way to allegorically have her cake and eat it too—to successfully, happily have the "best of both worlds" of living a normal life and the life of a teenage pop superstar. Things became so complicated and heartbreaking by the time she graduated from high school, that she had to choose between one or the other when she could no longer manipulate, scheme or negotiate her way through her personal issues, and she was hurting those she loved in the process; She couldn't have it both ways any longer.
Although Miley did a lot of things that made her personality seem sort of nasty, mostly in the later seasons, you have to consider this: while Hannah Montana, the sweet, innocent persona she puts up when she's being her famous self is seen to the world as this perfect human being, when she's Miley and out of the spotlight, she is more herself and we see many glimpses of her not being this sweet angel everyone makes her out to be. This can be said about every show in the past few years that has the fame concept and depicts a main character that's really famous and it can also be said about the people we see in school who look and seem so perfect when we see them in the hallway. And they may not do awful things when they're not holding up that perfect image for the moment, but they could do other things behind closed doors that society would not accept if word got out. Hannah Montana really gets us to look at the popular people this way and to not feel so insecure about ourselves.
The fourth and final season of Hannah Montana was shot in 2010 and broadcast between 2010 and 2011, a period of time in which Miley Cyrus was in real life moving into a more mature image and sound, and hoping to transition into more adult film roles, much to the chagrin of Moral Guardians and many longtime fans. It appears that many episodes had a Reality Subtext behind them, as if what was going on in Miley Cyrus's life and career was carried over to Miley Stewart's life and career, too. For example, one episode deals with Hannah experimenting with a new sound after going through writer's block and needing one more song for her next album. After she and Lilly hold a "focus group" to audition the new song, she finds out her fans dislike it (a funky, hip-hop/techno-dance song called "Gonna Get This") and want her to stay the same. Robby Ray suggests that Miley ultimately has to make herself happy, even if a few fans disapprove of her directions. Iyaz enters the studio, encourages her to keep the song, and records it with her as a duet.