I've been in many countries where there is separation of the Church and the State, for good reasons. Some people are not religious, don't believe in God, or have their own definition. They shouldn't have to sing the anthem in its current form, and that doesn't mean they are being unpatriotic. Their nation has nothing to do with God.
At school I didn't have to sing the national anthem (fortunately). I don't think that many countries still maintain the practice. I don't like the idea of children being brainwashed from an early age. They end up thinking their country is greater than what it really is, and lack critical thinking skills.
Children should have natural respect for their country. But respect is something that you earn from your deeds, not from your words (propaganda). Singing the national anthem won't fix the lack of legitimacy of the US government. The proof is that nowadays grown-ups no longer respect the presidency and their institutions. The US is another failed democracy.
Note that I am purposefully using words like State, Country, and Government which are all different but interwoven concepts. People tend to confuse all these. In my view true patriots love their country and hate their government.