I understand the following phrase as follows:
how to not be seen – how to avoid being seen altogether
how not to be seen – how to avoid outfits or circumstances in which you do not want to be seen
But it’s rather ambiguous and perhaps it’s the other way around or just depends on context.
I’ve seen Order of "not" with infinitive, but it still feels like there is a difference in this case and that the meanings are different.
If you’re curious, this comes from a Monty Python sketch.