On Manjaro Cinnamon I’ve swapped escape with caps lock using the dconf editor command
dconf write /org/gnome/libgnomekbd/keyboard/options "['caps\tcaps:swapescape']"
but on vscode I still have to use escape. What other permanent way can I use to swap this keys?