Even though its used as a weight loss drug, can one still gain weight while shedding BF%? Assume combined with Test.

I want to start shedding some BF, but would still like to gain a few pounds....at worst I want to say the same weight but shed BF.

thanks