How mortgage inquiries are actually treated
Credit scoring models are built to let people shop for a mortgage. Multiple mortgage-related inquiries made within a short window are generally treated as a single event rather than as separate applications, because the models are designed to recognise rate shopping for what it is.
The exact length of that window depends on which scoring model is used, and there is more than one in circulation. What is consistent is the intent: comparing lenders for one purchase is not supposed to be punished, and pretending otherwise is how people end up accepting the first thing they are offered.