connecting Open drain and Push pull outputs to drive the same pin
You can use a GPIO as open drain by programming it differently.

If you leave it programmed to output mode, then set the output data to 0 or 1, it behaves as a push pull output.

If you leave the output data set to 0, then program the mode to input or output, it behaves as an open drain output.

Although this is a fairly common pattern, it's worth leaving yourself a clear note in comments that you're using the GPIO in this way, to avoid accidents in the future should you forget what you've done.