I'm not 100% sure if this is specifically a MediaWiki issue or an issue with a script somewhere, but:
- Go to https://test.wikipedia.org/w/index.php?title=Sandbox&action=edit
- Click on the "Show preview" button below the edit box
I get the feeling this might be an on-wiki script somewhere, but I'm putting this here just in case it isn't, or there's a MediaWiki core aspect to it (P.S. the regenerated title still has $1).