If dark matter (DM) acquires mass during a first order phase transition, there will be a filtering-out effect when DM enters the expanding bubble. In this paper we study the filtering-out effect for a pseudo-scalar DM, whose mass may partially come from a first order phase transition in the hidden sector. We calculate the ratio of DM that may enter the bubble for various bubble wall velocities as well as various status of DM (in the thermal equilibrium, or out of the thermal equilibrium) at the time of phase transition, which results in small penetration rate that may affect the final relic abundance of the DM. We further study the stochastic gravitational wave signals emitted by the hidden sector phase transition at the space-based interferometer experiments as the smoking-gun of this model.