According to a review of the iPhone 12 by The Verge, the 5G indicator on iPhone 12 might not necessarily show the currently used connection. Instead, it could be used to depict the best available speed.
This is likely due to the new “Smart Data Mode” feature on iPhone 12 series devices. In order to save battery life, your iPhone will automatically switch between 4G LTE and 5G depending on need. However, if you turn off Smart Data Mode, your device will always use the best connection. While this means the indicator will always show the correct connection and you’ll always have the fastest speed while connected to cellular, your iPhone will use more battery and may heat up some.