SW1 and SW2 both default to STP priority 32768. Lowest MAC wins the tie — which in production is unpredictable. Configure SW1 so it wins the root bridge election for VLAN 1 deterministically.
SW1
SW2
32768