It's not a "law", it's often misused as a cheap way to attack things that are obvious satire. Like here, being edgy (even in bad taste) does not make someone an actual nazi.
Of course even if they were an actual nazi that should still be protected.
Poetically, the only other dog that I know of which learned the Nazi salute was absolutely despised by the Nazis, and they went out of their way to try to find the dog, using a lot of resources that could have been more efficiently used gassing innocent families.
Of course even if they were an actual nazi that should still be protected.