You've mentioned multiple times now Sans canonically switching fonts if I'm not mistaken? What/when are the instances of those?
To be precise, he switches from comic sans to the standard Determined font, so you could also technically call it "turning off his typeface".
there's four notable examples that come to mind
he even spaces the letters apart sightly, which implies he's talking slowly and deliberately. this fits two explanations, one doylistic: we don't know him yet, nor do we know the connection between skeletons and fonts so suddenly seeing dialogue in comic sans would break the tension in the scene; and one watsonian: he's trying to scare the crap out of you, so he uses the most terrifying voice he can make.
Yup. This one pretty much cements the interpretation that he switches fonts to sound scarier. He even does the creepy "music cuts out, speaks slowly and spaces the letters apart for maximum effect" he did in Snowdin Forest. But moving on,
While it's definitely meant to mirror our first meeting, what with the foreground elements hiding his appearance/disappearance, our being backlit throughout the whole scene, and the complete lack of music... there's no way that the player doesn't recognize his silhouette, and knowing the whole speaking in fonts shtick, seeing comic sans shouldn't break the scene anymore.
he's not spacing the letters apart like the previous occasions and he's speaking at normal speed, so I'd rule out that he's trying to sound scary, but he still drops his font in favor of the standard one, right until the moment his actual judgement begins (ie when he checks your EXP and LV). while you could still make a compelling doylistic argument re: comic sans just looks stupid in this scene, i think the font switch makes perfect sense if you read it as sans just being solemn for once. his judgement will inevitably get lighter-hearted*, and he'll go back to his font and soudfont, but it really feels like he wants to open the matter setting a serious tone. this is the end now. enough messing around.
*speaking of the tone of the judgement getting lighter. know what font he uses when it doesn't?
now THIS. this is an interesting one. because not only does it happen in battle, but there are three VERY big differences when compared to the occasions i listed above:
he's not capitalizing his sentences
he's not silent when he speaks. on the contrary, he's actually using a different soundfont: the standart one you hear with the narrator and secondary NPCs.
his text moves like a wave, much in the same way as napstablook, the heavily depressed ghost who's constantly crying, and the amalgamates (all bar endogeny, who doesn't speak at all) who are... well. you can assume what emotional state they are in.**
honestly I could talk about this detail alone for HOURS, especially when you consider that as soon as his memories are returned, he immediately goes back to his usual font AND soundfont
our friends during the lost souls fight are supposed to be at their lowest, confronting their character flaws and their demons. and considering the nature of what sans says, well... i think it's fair to assume he's either straight up crying or in otherwise extreme emotional distress.
aaaaand that's it! that's all the occasions that come to mind. from what we're shown, we can gather that sans switches off his font for occasions where the mood is far from light, either because it's serious, solemm, scary, or just plain sad.
there's a couple notable occasions that fit these criteria but still use comic sans, such as the "do you wanna have a bad time", threat the "heya. you've been busy, uh?" monologue before the genocide fight, and the genocide fight itself, though all of them can be explained with the fact that the pacing of the dialogue was far too fast for it to be effective.
but yeah. the lost soul segment is the one that makes me tear my hair out. hope this answered your question!