Worry not, it is supposed to do that. It's often referred to as "retained accessory power" on other brands, not sure what Hyundai calls it. Basically, if the ignition is turned to ACC or OFF, you have a 30 second period to operate the windows if need be. This feature is cancelled as soon as a front door is opened.
Operation is described in the owner's manual for the section on operating the power windows.
Hey, they do work when the key is first turned off!. I've been doing just like I've always done with all the vehicles I've ever driven with power windows. I've been turning the key back on when I've realized that I've left a window or two down and had to close them. This is a nice convenience
Unfortunately my factory sunroof doesn't use the retained power feature.. (I just tested it). I do have to turn the key back to on to close it.