Yes definitely needs to be ventilation as there's a fan on the compressor and it needs airflow. They normally have a requirement for the gap around the fridge to allow air flow.
Mine has the gap (possibly a bit smaller than required) but also has no rear to the cabinet so it's got free air to circulate between the fridge and the sliding door.
View attachment 240337