
Explanation
Box 1: retained until manually deleted
Since by default PeekLock shall be enabled in Queue, so it will move to DeadLetter after 2hours and stays there until manually deleted. Messages in the dead letter queue should be deleted manually.
Box 2: deleted immediately
Once a message is pulled, it will be deleted immediately. It does not make sense to keep the message further 5 minutes "locked" in the queue. Locking the message makes sense, for the case, when processing the message from a receiver, to lock the message, to avoid processing/receiving the message simultaneously by another receiver.
The receiving client initiates settlement of a received message with a positive acknowledgment when it calls Complete at the API level. This indicates to the broker that the message has been successfully processed and the message is removed from the queue or subscription.
Reference:
https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-expiration
https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-transfers-locks-settlement