After the company gets the real creditor's rights, it signs a lease contract with the collective, and who owns the factory?

It must be based on the agreement of both parties to the lease contract.

In the lease contract, the lessee must obtain the consent of the lessor if he attaches something new to the lease item. If the lessee attaches new things without the consent of the lessor, the lessor may require the lessee to restore the original state or compensate for the losses.

Article 352 of the Civil Code stipulates that the ownership of buildings, structures and ancillary facilities built by the right holder of construction land belongs to the right holder of construction land, unless there is evidence to the contrary.