Apple Pencil Pro glitching on iPad Air M2

Apple Pencil,iPad

Apple Pencil Pro randomly connects points on my new iPad Air 6th Generation (M2) 13”. Does anyone know how to fix this? It’s quite annoying.