The game forgets to apply the God Mode protections to the player once another command is given to the console.
Upon activating godmode, whether I give myself something, spawn something in, LongUpdate, or whatever, I go back to the normal condition of being able to lose hunger, health, and sanity. However, god mode is still active because when I type type c_godmode() back into the console, it displays "God mode: false." Then I have to input it one more time to get "God mode: true" and become invincible again. Very inconvenient for tracking down other bugs.
EDIT: Hmm... seems to be working okay for c_give right now. Maybe it's just certain items? I'll try to test around more and see if I can pin it down
1. Activate God Mode 2. Enter any other console command 3. Put yourself in a situation to lose hunger, health, or sanity