Your brain can function without oxygen for over 30 seconds. I see no reason why it wouldn’t in a detached head.
The guillotine suffer from the same issue most execution methods used until now, they only seem “quick and painless”. Nitrogen gas actually is painless.