“In theory” is a simulated version of real world conditions. If something doesn’t work in the real world but works in simulations, then the simulations aren’t adequately representing reality.

It’s not that it works in theory, it’s that the factors you’re assessing the theory with are just as flawed as the theory.

“Works in theory” is just a polite way of saying “Nope. It’s wrong”