It depends on the specific IP office. Some IP offices do indeed notify owners of earlier registered similar marks during their assessment process.
For example, the EU examiners reach out to earlier trademark owners if they find out a confusingly similar trademark is attempting registration. The notification gives the original holders a chance to oppose such trademarks once they are published for the opposition period.
In the UK, the same applies. The holders of similar marks are notified by the UK IP office in case there is a confusingly similar trademark.
In the US, the examiner will stop an application by issuing an "Office action" if a confusingly similar trademark is found, either with a pending or registered status. The examiner doesn't notify the owners of similar trademarks.
The same applies in Australia. The examiner can temporarily stop or dismiss an application by issuing an "Office action" but does not notify any earlier owners.