Electric Lawnmower - Is The Problem With the Mower or the Extension Cord?
The connector is worn and/or damaged.

The best solution is to replace both connectors (male and female). This is easy for the extension cord but you may need to order a spare-part for the lawnmower connector.



As an alternative, You could probably hard-wire a line connector rated for outdoor use (wet conditions) but you'd need to open up the lawnmower connector and make modifications to remove the existing connector and provide strain relief for the new short cable to the line-connector.

  

Typical outdoor-rated unearthed line-connector for (double-insulated) lawnmowers etc used in the UK. There will be equivalents for US and other countries.