The DLL will only unload if you manually do it. It will keep the values constant until you remove it (Unload) or close the game. Values change sometimes so if you do hex edit it, you'll need to do it over and over every time the value resets (As I've experienced them resetting every 5 minutes.) Hence an infinite loop.
So what you're saying makes no sense unless you see no problem hex editing every 5 minutes or so. This is why there's a loop.
So basically you have to inject the DLL every time that you start up the game to change the value? Ain't nobody got time for that.