Dunno why this is downvoted, this is unironically a last resort of mine. I don’t want to maintain a fork of grub but if it comes down to it, I may do something similar to this except the sed trick doesn’t seem to work anymore.
EDIT: sed trick does work. I just forgot to install grub with –disable-shim-lock.