I was playing on PC from steam, level 10 “The Masterpiece”, the game crashed when I went to delete the bakery, I tested it 3 times. I even deleted everything around it one by one to make sure it wasn’t other buildings. Once I forced the villagers to eat all the bread in stock, I was able to delete the bakery with no issue.
I think it’s due to the fact that the villagers don’t have a place to store the bread.