The first suspect is the handset, not the network. An Android phone in battery-saver mode will delay a background wake-up by minutes, and every manufacturer implements that differently. A gateway phone should be plugged in, excluded from battery optimisation, and left with the screen off rather than the app force-closed.
The second is the queue in front of the message. A one-time password sitting behind two thousand campaign messages will go out when its turn comes. Keep transactional traffic on a device that does not run campaigns.
The third is expiry. A code that is only valid for two minutes should not be queued with a twenty-four hour lifetime — if it cannot be sent inside its own validity window, failing fast is more honest than delivering it late.