@JennyH
Hi.welcome to the community.
Normally it is not suggested to put Deco into a closed cabinet since it would block the wireless signal especially when Decos are on wifi backhaul.
Back to your original question, you could see the physical dimensions under Specification.
Deco X20/50/60 would be shorter but a little fatter.
https://www.tp-link.com/en/compare/?typeId=5700&productIds=58736%2C58879%2C52557
or Deco M5/M9 plus have a plat design, instead of a cylinder style.
https://www.tp-link.com/en/compare/?typeId=5700&productIds=42874%2C42879
Best regards.