How to sort the table using model accessor
I don't think you can do this. Use a callback instead
https://filamentphp.com/docs/3.x/tables/columns/getting-started#sorting
https://filamentphp.com/docs/3.x/tables/columns/getting-started#sorting
TextColumn::make('full_name')
->sortable(query: function (Builder $query, string $direction): Builder {
return $query
->orderBy('last_name', $direction)
->orderBy('first_name', $direction);
})