Usage of 74LVC1T45 in open-drain case
When an open-drain signal is inactive without a pull-up resistor, then the B input is floating. This is an invalid state; the input might be read as low, or high, or oscillating, and you might get shoot-through currents (see TI's FAQ).

Furthermore, I²C is a bidirectional bus, and there are times when it is not possible to determine a direction (when no or multiple drivers are active). So it is not possible to use a direction-controlled level shifter like the 74LVC1T45 for I²C; this requires a passive switch like the LSF0101 (or a plain MOSFET).

If you want to be able to switch between UART and I²C, you need both kind of level shifters, and additional switches to connect them appropriately.