Backport PR #48412 on branch 1.5.x (BUG: safe_sort losing MultiIndex dtypes)
Backport PR #48412: BUG: safe_sort losing MultiIndex dtypes
cc @mroeschke 
This should cover the parts that we need for the other pr Thanks @phofl 