As previously discussed with @tcbern at #kde-freebsd, audio/cantata-2.0.1_1 do first look at the "AlbumArtist sort" tag in order to sort the albums, however it is ignoring that tag and supposedly looking on the "Artist sort" one, what is causing a messed up sorting list when the album have more than one artist.
The same verison of cantata was also tested at Kubuntu in order to verify if it is a FreeBSD specific issue, and this issue was not reproducible in there.
A closer look and it seem to be indeed a audio/musicpd issue instead of a audio/cantata one.
A look on "Server Information" show for some reason musicpd do not support the AlbumArtist tag of FreeBSD, at least on my installation.
I tried musicpd on some Linux distros with older versions of it, and also the current one on Manjaro and this problem is not reproducible in there. So, the "Server Information" do report AlbumArtist musicpd support for all of them.
I changed the title to match with what seems the correct port source of the problem.
I cannot reproduce this problem with musicpd. AlbumArtist based sorting works fine here. Can you try with another mpd client (e.g. audio/pms)?
While I am still looking how audio/pms works, I tried with audio/ncmpcpp and also connecting from my Android phone using M.A.L.P. I had tried with some others Android software before, like MPDroid, all with the same result.
OMG. The "metadata_to_use" variable on musicpd.conf was wrong. I did look into it so many times and did not see that before.
I am sorry.
No worries. Good to hear that you found the problem!