Audacity does not currently have that functionality, and it would be difficult to implement in Audacity because the device list is dynamic - If you plug in an external audio device, then the list of available audio devices changes.
On Linux it would be “possible” to write a configuration script for your computer that sets the default playback and capture devices. You would then be able to leave Audacity set to record and playback using “default”, and run your script to set what device is the default. One way of doing this is described here: sound - How can I change the default audio device from command line? - Ask Ubuntu