Extension Cord Guide
The simple answer is YES but you have to follow guidelines and check for heating
The problem with using extension cords with EV Charger is that they can overheat and melt if the wire is too skinny). Then bad things happen, Solution use the proper wire gauge (AWG) and check for heating after charging for 1 hour.
Warm is Ok, Hot like Coffee is not.
SUGGESTION - Avoid lighted extension cords. They have very poor plug/receptacles
Here is the Guide - EV Charger vs Extension Cord Length
How Much Current can my J1772 Cable Handle?
Generally the pins in the J1772 handle are all the same - 16A to 50A. It is the wire size (AWG gauge) that makes a difference
Here is a table for a 25' long EV Charging (EVSE) Cord. You will notice that the power loss is very small when compared to the power delivered. You do have to check the temperature of the cord and connectors after charging for 1 hour. Warm is Ok, Hot like Coffee is not.
Table - J1772 Max Load vs Cord AWG