Hawking–Page phase transitions in four-dimensional Einstein–Gauss–Bonnet gravity