Whether finite systems may feature a mathematical singularity or not is an old controversial issue. In fact, at the Van der Waals memorial meeting in 1937, the audience could not agree on the question, whether partition function for a finite system could or could not explain a sharp phase transition. So the chairman of the session, Kramers, put it to a vote!
At quantum level, for sure, a statistical partition function for a finite system is an analytic function of (typically) temperature and volume. This implies, e.g. the specific heat at constant volume, Cv, is finite, never diverges. However, if we consider alternatively the specific heat at constant `pressure', this quantity, Cp, may become singular, as shown first here and then here.
According to them, the ideal Bose gas confined in a cubic box, (the standard textbook quantum system), may undergo a liquid-gas-type phase ``transition" under constant pressure condition, even though it consists of a finite number of particles.
The punchline is to choose an alternative section condition on the domain of the analytic function (temperature-volume plane), such as the constant pressure condition, and to realize a singularity.
I would invite you to watch a short YouTube Video and to think of the gedenken experiment therein.