GPS Frequency change

Hey all, I am using Dronekit to get GPS data from Pixhawk to Rpi using telemetry 2 and storing the GPS data in a CSV format on Rpi.
I tried to change the frequency of GPS data by changing the SR2_Position parameter to 1 Hz, but it keeps on changing back. I have also tried to change the Telemetry Rates position to -1 in Mission Planner and “set streamrate -1” inside

But the issue still persists, can anyone please help me with this.