Exactly, you need to protect the hydroxyl group, otherwise the Grignard reagent will be deactivated.
Theoretically, it could be possible to use the double amount of the Grignard reagent, in order to achieve the addition on the ester group, too. But in practice, this does not work well and leads to low yields.
For your own education, Grignard reaction with esters does not stop to the ketone, but it goes further to the formation of tertiary alcohols. Ketones can be prepared from esters by reaction with organocadmium reagents.
Please, take a better look to the Grignard reaction.