Brezin–Gross–Witten tau function and isomonodromic deformations