Sunspot activity and the long‐term variation of the Sun's open magnetic flux