@shenwei356's is right when he says that you need to escape the @ character with the inverted slash \ if you want to use it inside a regex pattern. additionally, you don't need to store all header in $1, but simple to replace the initial @ character:
but it looks like you are trying to edit only sequence headers just by looking at the first character, and you can't do that since the @ character can also appear in the quality string. a quick way to workaround this could be replacing odd lines only: