I keep a backup copy of ~/.config/plasma-org.kde.plasma.desktop-appletsrc
. This file contains many desktop and panel settings.
There is also a tutorial for saving configurations generally
But fair warning: this uses the AUR package konsave
. I have never used it myself, and my impression is that konsave
may not fully support Plasma 6 until the new konsave
version 2.3.0 is released in a few months.
Of course, the best option is to repair the system so that it does not keep resetting on its own. The Arch wiki describes how to reset Plasma settings. Note that you may want to employ a more selective approach to clearing the cache than described in the wiki.