As a short answer, muxes for bidirectional signals don't exist. Also bidirectional signals don't physically exist internally in programmable logic. They exist as wires to external bidirectional I/O cells or they are only virtual.
If you want to switch real (I/O cell connected) or virtual (internal only) bidirectional signals, you have to break them in unidirectional signals. Obviously, a data direction information is necessary to do so.
The said problem of having multiple drivers would be continued without an unequivocal direction signal. But if you have this direction signal, or in other words, know at each time which side is intended to drive out, you don't need a multiplexer. You only have to control all drivers at the bidirectional node or "bus" accordingly.