Instead of editing /etc/grub.d/00_header (which might get replaced on a grub upgrade?), you can also add GRUB_GFXPAYLOAD_LINUX=1024x768 (or whatever res you use) to your /etc/default/grub. See [https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html].