Every cable guide is different. Pictures might help. But to keep things simple, you can disconnect the hose from the brake lever, but you can't disconnect (and reattach) the banjo from the hose.
You can also just cut the hose away from the shifter and splice it back together with a coupler like this:
https://www.universalcycles.com/shop....php?id=105419
But that raises questions about how much your time is worth.