I don’t think these modifications will ever be persistent. We should not mess with the vitual machine of Docker Desktop as the goal is to have a virtual machine that Docker Inc can support, but it is much harder to support something when you don’t even know the state of the system. This is not a statement from Docker Inc, only my opinion, but I think it is a good strategy. If we want to do something more serious, we can create a virtual machine and install Docker in it. I use Multipass sometimes, but it is not really stable recently on macOS.
That being said, you can make it at least almost persistent and I wrote about it in some topics:
To summarize it: You can run a container that has to run before everything else and it can run in a loop to make sure the kernel parameters are set correctly.