Can I change the default sysctl values in grub?
The feature you are looking for is available only since kernel 5.8, as described in this UL SE Q/A: How to set sysctl using kernel command line parameter?:
sysctl.*= [KNL]
Set a sysctl parameter, right before loading the init process, as if the value was written to the respective /proc/sys/... file. Both '.' and '/' are recognized as separators. Unrecognized parameters and invalid values are reported in the kernel log. Sysctls registered later by a loaded module cannot be set this way. Example: sysctl.vm.swappiness=40
So combined with devconf_inherit_init_net
found by OP in a previous Q/A, starting from kernel 5.8, but not before and thus not before 5.1 either, adding through GRUB these two kernel parameters:
sysctl.net.core.devconf_inherit_init_net=1 sysctl.net.ipv6.conf.all.forwarding=1
will achieve the intended goal.