When you try to save your script does Maya lock up? I have seen cases where the file dialog opens off screen and you can't see it, but in that case Maya would be completely locked. Are there no errors at all in the script editor or Output Window? If you turn on "Echo All Commands" in the script editor and then click the menu item what does it print out?
You can try calling this from the script editor to see if it works, this is what the menu would call for a mel tab:
commandScrollFieldPromptForFile "Save Selected" "C:/Users/timfo/Documents/maya/2020/scripts/" 1 "mel";
For the shelves, if you hit the little gear icon on the left side of the shelves and choose "Save All Shelves" does it save it then?
Also for the shelves, after hitting the "Save All Shelves" menu, go to your preferences folder and check if the file actually got saved. You should see some .mel files under <Maya prefs>/prefs/shelves. Open up the .mel file for the shelf you saved in a text editor (e.g. if you saved to the "Polygons" shelf then open up shelf_Polygons.mel). Does it have the button you expected listed in there? You should be able to figure out if it's there or not depending on what it's executing in the "-command" line. I think the buttons get saved in the order they are in the UI, so if you added a button at the end then it should be listed last in the .mel file.