koros,
а так?
<script>
const sort = (a, b) => a.localeCompare(b, ["en", "ru"], { numeric: true });
const myFilteredFiles = ["A", "B", "C", "g10", "g8", "g1", "11", "H"];
myFilteredFiles.sort(sort);
document.write(JSON.stringify(myFilteredFiles, "", 4))
</script>