Use the
[GUI Plugin] Quality Check to "Check Metadata" for "authors with commas" and "invalid author sort".
You can use one of the Fix options to
swap author FN LN <--> LN, FN
when the author has a comma, and from there you can use Bulk Edit Metadata to recalculate all author_sort values, after finding the books with invalid author_sort.