Do the Xbox One games erase if I disconnect the console from the power?
Solution 1:
Unless you have modified your console to replace its built-in HDD with some sort of RAM disk, removing power won't affect the data stored inside, even over extended period of time.
However, if a game is currently running and you haven't saved your progress before removing power, that progress will be lost. Already saved progress will remain safe.
Important
Keep in mind that it's best to unplug your Xbox One while it's powered off to avoid damage to your disk. If your Xbox One is installing something, like a system update, unplugging it then can render it useless.
Make doubly sure that your console is in Power Saving Mode before turning it off to avoid entering standby, and only then remove the power cord.