The difference between the World Wars is that in World War I we didn't have any real say in whether we did so. Britain still had formal control of our foreign affairs, so when it declared war the Dominions were automatically part of it.
In 1931, the
Statute of Westminster gave the Dominions an equal constitutional status with Britain itself. They all continued to have the King as a monarch, but they now technically each had a "separate" Crown that had its own full set of powers. The Canadian Crown is separate from the British one, and we could potentially set our own succession rules if we wanted to, so that a different person takes the throne instead of the Prince of Wales whenever King Charles passes.
We could've actually sat out World War II if we wanted to, but public opinion would never allow that. William Lyon Mackenzie King, our Prime Minister at the time, got Parliament to authorize Canada's own separate declaration of war on the Axis, but he deliberately waited ten days after Britain made its declaration to show that Canada would make its own independent decisions.