Newbie: How to use Picard-Last.fm.ng and changing artist to artist sort order

You could try the following:

Install the plugin “View script variables” and enable it within Picard. This helps a lot to see what happens under the hood. And enable debug logging…

Many scripts I’ve seen use:
$set(artist,$get(albumartistsort))
or

What’s the file format? Maybe the following is interesting too and relates to your issue:
https://picard.musicbrainz.org/docs/tags/#other_information

For technical details on how these tags are written into files, see Picard Tag Mapping.

If you set new variables, these will be saved as new tags in ID3, APEv2 and VORBIS based files. For ID3 based files these will be saved to, and reloaded from, ID3 user defined text information (TXXX) frames. They will not be saved in ASF, MP4 or WAV based files.

For ID3 based tags i.e. mp3 files, you can also set ID3 tags directly from your scripts by setting a special variable starting ‘_id3:’. Currently these tags are not loaded into variables when you reload the file into Picard. (Since Picard 0.9)