Execute console command for set resolution not work in editor utility widget (4-27)

I’ve been trying to make an editor utility widget that changes the resolution through console command. When pressing the submit button console command gives the correct command without complaining, e.g. r.setRes 1280x720, but the resolution still doesn’t change.
Instead, if I write the same command in the console log, the resolution changes.
The end result is the same, both in the new editor preview and standalone.
What could this be about?

Cause you need a world context Object for this to run correctly.
Try to add a [Get Game World] node