If using real barlines, the only way that I know of to stop note/beam grouping getting recalculated is to use tuplets that span barlines, and hide the tuplets.
You could also use a dashed vertical line, but these aren’t really intended for cross-staff use.
It’s funny you mention this. Just yesterday I discovered a score by Sigfrid Karg-Elert that uses courtesy dotted barlines (in this case, indicating the half bar) that do not break apart a dotted whole notes, and I was wondering how on earth to accomplish that… it happens multiple times in the attached image alone. This case is fairly straightforward as to ‘why’ it’s being done, but it’s also used elsewhere. I also do this in accompanied chant, occasionally.