Hi yo, sorry for the late reply on this one. The rule for this is similar to the rule for whether to use a comma with "who" or "whom": Is the modifier essential (no comma) or inessential (comma)?
In your examples, I could see an argument in favor of either interpretation.
If Hannah's entire thought is that the bakery is a delicious place, and the rest is just further inessential info about the place, then use the comma:
yo4561 Wrote:Hannah thought that the bakery was a delicious place, where she could eat all types of pastries and learn how to bake through lessons.
If the fact that she can eat pastries and learn how to bake at the bakery is Hannah's overall thought or the "where" gives the
reason that Hannah thinks the place is delicious, then don't use the comma:
yo4561 Wrote:Hannah thought that the bakery was a delicious place where she could eat all types of pastries and learn how to bake through lessons.
For example, I would not use a comma before the "where" in the example below, because the main contrast in the sentence is against that "where" modifier:
Hannah thought that the bakery was a delicious place where she could eat all types of pastries and learn how to bake through lessons, but during the pandemic, baking lessons were cancelled and the bakery only offered croissants and donuts.As you can see, the answer is very much "it depends on meaning," so something like this can be too close to call. This is probably why the GMAT generally doesn't test comma vs. no comma.