We get this all the time when my kids' friends come around, as most of them live in a house with a garden and our flat is exceptionally small with no outdoor space.
I have never found it rude or insulting because they are children and it is obvious when they have never seen a similar type of home. The comments are just neutral observations.
If a child were using a demeaning tone or trying to cause offence I would take note, but that has never been the case.
If my own child made a comment that an adult would know is rude, I would make sure to fill them in on the background (in this case, different homes that exist) and at some point it would be appropriate to let them know what might seem impolite or hurtful, but not in the moment.
When my own kids do complain that "all" their friends live in lovely houses, I do point out that certain friends never invite anyone home and this is because they are more overcrowded than we are by far, so they are comparing themselves with an unrepresentative set of people.
Hopefully your daughter won't internalise the idea that a smaller home is shameful and will continue to treat it as if her friend commented on anything else that she noticed.