to exapnd, there are three similar shortcuts (add shift to reverse order):
1. ⌘⇥ (cmd-tab) - regular mac app switching
2. ⌘-`(cmd-grave) - "Move focus to next window"
3. ⌥⌘⇥ (opt-cmd-tab) - "Move focus to active or next window"
this last one needs manual configuration iirc, and this is what mine is configured to. it's the one that acts most like "switch back to the last active context". however, the system is somewhat unintuitive about how it designates the "next" window (especially if you intermingle all three shortcuts), so it's not very reliable.
I did that on my old TouchBar Mac too, life saving. As soon as they brought out one with an escape key I replaced it. And again when the new ones came out with no TouchBar at all. What a farce the TouchBar was.