For example here (
lichess.org/oopWxd6Y/black#62) where it spots a mate in 37 with only a default depth of 23.
Sorry if this is an elementary question
depth is not stopped on fixed depth. All takes and checks are evaluated untill situation is still. And that is what good humans do. No point trying to evaluate if there action going on
Additionally, if a position leading to a forced mate is found in an endgame tablebase lookup (in move-by-move analysis, this will show as #24 or something similar), those moves will be added to the search tree without any need to calculate more deeply.