A6 Module Connected to ESP-32S

Try replacing this line

HardwareSerial SerialAT(1);

by

#define SerialAT Serial1

Post complete code that shows the problem. If above posted code already show the problem, post the output you get in the serial monitor.