We are sorry to hear about this...
There are 2 ways to prevent this:
1 - Do not accept or reject the request. If the request is still pending, the user will not be added to your connections and cannot send a new request.
2 - Report the incident on help and support on your profile or the home screen.