A lot has been discussed on overflow regarding geometric Langlands and the physics of Kapustin and Witten's groundbreaking paper https://arxiv.org/abs/hep-th/0604151. I would like to add my two cents on the topic and ask specifically about the harmonisation two aspects; (1) Kapustin and Witten's branes - specifically those of type BBB and BAA, and (2) the role of derived moduli stacks. In the original Kapustin-Witten formalism, these branes live on the moduli space of Higgs bundles $\mathcal{M}_G(X)$, where $X$ is a smooth algebraic curve over $\mathbb{C}$ and $G$ is a reductive gorup.
To make contact with the geometric Langlands correspondence, it seems that Kapustin and Witten's branes should live on the derived moduli stack of Higgs bundles; $$ \operatorname{Higgs}_G(X) = \operatorname{Maps}_{dSt}(X_{Dol}, BG). $$
My question: Do physicists have a way to make branes stacky, so that Kapustin-Witten's branes live on $\operatorname{Higgs}_G(X)$?
My simple-minded thought on this: Kapustin and Witten consider a sigma model with target in $\mathcal{M}_G(X)$, so perhaps I am asking for the construction of a similar sigma model with target $\operatorname{Higgs}_G(X)$.
Gaiotto and Witten (https://arxiv.org/pdf/2107.01732.pdf) describe the situation as; The mathematical statement that the correct formulation involves stacks corresponds to the quantum field theory statement that the correct formulation is in four dimensions. My question is perhaps asking for an explanation of this quotation.
To add a little bit about the mathematical side of things - the Betti geometric Langlands paper of Nadler--Ben-Zvi provides "BAA branes on $\operatorname{Higgs}_G(X)$ $\simeq$ nilpotent sheaves", and the Overflow forum "Geometric Langlands: From D-mod to Fukaya" gives the D-module perspective. BBB branes are "hyperkahler rotations of $D^b(\operatorname{Higgs}_G(X))$", an idea I tried to capture in https://arxiv.org/abs/2311.10032.
I would love to hear perspectives on the mathematical interpretation, but this post is primarily my attempt to understand the original motivation from physics.