Photo-evaporation and planet formation have both been proposed as mechanisms responsible for the creation of a transition disc. We have studied their combined effect through a suite of 2d simulations of protoplanetary discs undergoing X-ray photoevaporation with an embedded giant planet. In a previous work we explored how the formation of a giant planet triggers the dispersal of the inner disc by photo-evaporation at earlier times than what would have happened otherwise. This is particularly relevant for the observed transition discs with large holes and high mass accretion rates that cannot be explained by photo-evaporation alone. In this work we significantly expand the parameter space investigated by previous simulations. In addition, the updated model includes thermal sweeping, needed for studying the complete dispersal of the disc. After the removal of the inner disc the disc is a non accreting transition disc, an object that is rarely seen in observations. We assess the relative length of this phase, to understand if it is long lived enough to be found observationally. Depending on the parameters, especially on the X-ray luminosity of the star, we find that the fraction of time spent as a non-accretor greatly varies. We build a population synthesis model to compare with observations and find that in general thermal sweeping is not effective enough to destroy the outer disc, leaving many transition discs in a relatively long lived phase with a gas free hole, at odds with observations. We discuss the implications for transition disc evolution. In particular, we highlight the current lack of explanation for the missing non-accreting transition discs with large holes, which is a serious issue in the planet hypothesis.