First of all, it is not allowed for the customer to modify the IMEI of the module. Quectel cannot guarantee that it works if modify the IMEI or after the IMEI.
On my device, the AT command is successful only when the modem interface is in a certain condition - and the interface is not up, or not fully up, while my particular device is also connected to WAN via Ethernet. The solution was to disconnect the WAN Ethernet cable and have the modem up and connected while entering the AT command.