If it was safe to overtake and someone prevented your overtake by speeding up, the best thing you would do is put on your hazard lights and slow down to get to your previous spot. Otherwise, you would cause an accident, so that would not be good for you either. This is why the best thing to do is to slow down safely and try to get back to your previous spot. Make sure to get the clip of that part so you can report that player under §2.5 - Reckless Driving.
Adding on, keep calm. In case it was safe to overtake and they did this, you would not be in trouble with your evidence unless you violated rules. This is another reason why using a clipping/recording software is helpful.
Below is a part of rule 2.5, from https://truckersmp.com/rules. I hope this helps you.
Sincerely,
Kaan