You get restricted for 20 minutes for queuing for PvP if you “cancel” a queue.
You could accidentally/intentionally hit the queue button AND EVEN IF NO MATCH IS FOUND, if you hit cancel button AT ANY TIME after you start the queue, it penalizes you and counts as if you declined a match.
If you leave a map or to go to a different map or your stronghold while in queue that also counts as a “cancelled” match, and you are penalized for that as well.
Any instance that does not involve hitting the Accept button to start a match, after you enter PvP queue will count as a penalty. So it is impossible not to get penalized after you QUEUE for PvP if you decide to stop queue for a split second.
Even after 30 minutes of waiting in PvP queues and failed matching making error messages, if you stop queue to do a chaos dungeon or any other PvE content that makes the queue stop, you will get penalized.