The contractor may become an admission body in the LGPS and this would allow you to stay in the LGPS so long as you continue working on the delivery of the contracted out service. If the contractor becomes an admission body, the pension benefits you have built up before the transfer can be joined with your post transfer pension account. See transferring in previous pension for more information.
Alternatively, the contractor may be able to offer you a broadly comparable scheme. This does not mean that the new scheme must mirror the benefits of the LGPS, but the value of the package offered by the new scheme must be broadly equivalent to the LGPS. If you are offered a broadly comparable scheme you would have the same options available to you regarding your accrued LGPS benefits as anyone else leaving the LGPS before retirement.