It should be fine with a properly manufactured cord. A buddy of mine ran a welder with what had to be a 25-50 foot extension for years.
Just get something with proper certs, etc., like this from Home Depot:
This AC WORKS brand dryer extension cord [1430PR-025] is reliable and durable. The cord comes in a 25-foot length and is NEMA 14-30P to NEMA 14-30R. This product will connect a NEMA 14-30P plug to a NEMA
www.homedepot.com
5 year warranty, UL, C-UL listed, one of the reviews even indicates using it charge a Tesla.