Yes, you can!
In order to unlock an iPhone's eSIM, it is necessary to unlock the device's main IMEI number. The reason for this is that the iPhone's baseband is locked rather than the IMEI associated with the network carrier.
In summary, it is the antenna's software which allows the device to be used on a network different to the original. If one IMEI is unlocked, then so is the other.
If you check under Settings on your iPhone, you will see that the device has two IMEI numbers.
The IMEI of your iPhone is the number under Primary. In that section you will find information on the Network, Carrier, IMEI, ICCID, and MEID. Keep in mind that here will be displayed the name of the network of the SIM card inserted in the phone and not the original network carrier. If you do not know to which carrier your iPhone is locked, you can find out using our Original Operator Check.
Below you will see the following text Second SIM, and no further information. This is the IMEI of the eSIM.
If an iPhone can only be used on one network, then the eSIM will only work on that same network too.
In the event that the iPhone's main IMEI is unlocked, we recommend checking with a SIM card from a network carrier different to the original to see if the eSIM is also unlocked. If not the case, you can submit another unlocking request indicating the device's digital IMEI.