PHP8.3でmb_detect_encoding()の動作が若干変わってそうなのでstrict付けた方が良さそう。
mb_detect_encoding()
strict
mb_detect_encoding(string: $string, strict: true);