Answer:
In the long-run equilibrium, there is no incentive for firms to either enter or leave the industry because the firms should all be making 0 economic profit.
Economic profit is not the same as accounting profit. Economic profit equals total revenue minus total cost, but the costs measured are the opportunity costs, not the accounting costs.
If the firms in both perfect competition and monopolistic competition would be making economic profit, then new competitors would enter the market. If the firms were suffering economic losses, then they would leave the market. That is why in order to achieve long run equilibrium, economic profit must be 0.