From #144039 (comment)
This probably illustrates a problem we have with the current system: we don't prevent if a short string was created but was never printed. I think there could be a mechanism (a drop guard for a custom short_string return newtype) in which we detect that. Could you open an issue?
One alternative is to completely migrate any diagnostic mentioning types to structured errors, as those already handle path shortening appropriately.