I suspect there is another issue at play here. That code is from the AMP documentation.
I’ve now tested Scriptless with the Twenty Nineteen theme and the AMP plugin. In both Standard and Transitional modes, the buttons display and are styled properly, with the plugin CSS automatically added to the amp-custom.css file. The code example I provided does prevent the buttons being output at all. In reader mode, it appears that the code example is not needed at all, as the buttons are not output without the code.
Since the buttons are present for you, I’m guessing you are in Standard or Transitional mode; the issue appears to be at the CSS level. I know there is a limit to how much CSS is allowed with AMP; one possibility is that you are over that limit.
If the filter is not working, you may want to try a later priority on it, as that suggests you may have another instance of the filter running which is overriding this. You may need to try more in depth troubleshooting, such as reverting to a default theme. As far as I can tell, the issue is not with the Scriptless plugin.