Since keymap is accesible via Python there should be no problem to write an addon that changes keymap according to an active workspace. But honestly I don’t think anyone will spend the time to write one, unless there are more users that actually need it.
If you can code then you write it yourself. There are tutorials on YT made by blender devs on how to write an addon. The series is called “scripting for artists”
I have some basic coding skills, maybe I’ll try the write the add-on.
Shouldn’t be difficult I guess. I hope it’s possible for the add-on to know if I’m working on a ‘2d animation’ or ‘general’ project.
You might be able to reference the workspace to your keymap. If you don’t edit your keymaps a lot, you may also set the preferences window to a hotkey and than change to a keymap with RMB pan (or use this method as part of your script to change navigation settings with a hotkey/ workspace toggle).