Better Sprinting Mod (1.16.5 and 1.15.2) allows for you to tie sprinting to a key. It’s compatible to most mods that alter options like and Optifine. Mods that alter the behavior of player entities or Controls menu will only cause incompatibilities. Adding new buttons to GameSettings will work but changing how Controls menu looks/works won’t. Saving settings won’t be affected.
Although the Minecraft sprinting system felt unfinished and unfinished, Better Sprinting can help.