Creating an invoice converts a lead/prospect into a customer, so this shouldn't be an issue. If it is happening, I would suggest reviewing the cause because it doesn't make sense to keep a customer as a lead/prospect after invoicing. If you had to, you could use the customer Status field to filter.