Weight loss

I'm trying to lose weight but I'm scared that when I do I'll have hella lose skin, how can I replace that with muscle while getting the lean physique?
for loose skin you are gonna have to get a surgery to get rid of it when you are losing tons of bf