Transformer Working Principle
If it's a 1:1 transformer and the applied voltages are identical and have the same phase AND, the windings have the same "dot" position, the magnetization current will be shared by both windings, each contributing half. Think of a bifilar would primary as an example: -



Should there be a turns ratio N, then, providing the applied voltage to one side has the appropriate scaling of N or 1/N, although the magnetization currents will be different in secondary and primary (due to N), the core flux will be the same.

With different phasing you get problems unless the dot notation to one winding is the reverse of the other then it's the same as above.

With no dot notation change and opposite phases you get a big problem in theory and in reality - a bigger problem than that of a short circuit on one winding. In principle the same problem occurs when you join up two batteries in parallel but get the polarity on one of them wrong. Smoke. The flux in the core will rapidly become zero because one of the windings will melt and go open circuit or a fuse/breaker will activate.

It's simple enough to use a sim tool to see what happens.