Flux noise near the Berezinskii-Kosterlitz-Thouless transition