People don’t know what to say and how to say it on ANY DIFFICULT OCCASION. Just accept it with gratitude and move on. I have kids with special needs, disabled or dying relatives. And people want to show they care but they can get it so very wrong. It’s ok. Educate when feasible (like having dinner with someone) and just thanks and move on to the rest (in public).
I have heard these comments before from people who’ve served and I really often don’t say anything because I am afraid they will take it wrong, unless I know them. I just pray for those I know in harms way, and generically for those I don’t.
I have learned long ago that people say it wrong and I just smile and deal with it, or softly say it right. (Example for adopted child: “who’s their real mother?” I might softly say “me.”) I take people as they are, they don’t mean it in a bad way.
Apparently you missed the point. If you mean it, say it. If you don’t, don’t bother.