If Amber can sing this when she's queen for the day, why can't Sofia sing it when she's temporary ruler, or when things get difficult for her when she's first starting her new life as a princess?

Sofia: I've got the keys to the kingdom
The world is open wide
So I'll just have to walk right up
And see what's inside
I've got the keys to the kingdom
And soon, they will see
They gave them to the right one
To me

Carrots, peas, Roquefort cheese
Add a little pepper, please
Caviar?
One more jar
Fizzy things to drink

Tulips here, lilies there
See if you can carve a bear
Orange trees, if you please
Paint the trellis pink

James: She's got the keys to the kingdom

Baileywick: A wonder to achieve

Sofia: The biggest vote of confidence
A soul can receive

Amber: She's got the keys to the kingdom

Sofia: Its keeper I'll be

Baileywick: And do her job exceptionally

Sofia: All of these momentous decisions
Are they up to me?
Of course! I'm royalty
But do I have what it takes?
What if I make mistakes?
I don't know, but I'll start
Leading with my heart

Baileywick and James: She's got the keys to the kingdom,
Her palace and the throne
We know that she can handle any job on her own
She's got the keys to the kingdom

Sofia: Right here in my hand

Amber: And everything is bound to be grand

Baileywick, James, Amber: She's got the keys to the kingdom
Her world is open wide
She's got the capability to take it in stride
She's got the keys to the kingdom

Sofia: It's all up to me
I'll show them what a princess can be

And later

Sofia: I promise not to use this, no magic.
I took the easy way, and look at me today.
I'll figure out what to do.
Use my head, see it through.
Here and now I will start, leading with my heart.

Amber, James, Baileywick: She's got the keys to the kingdom

Sofia: It's all up to me.
I've shown them what a princess can be