Sure, you can do it.
It is a real challenge to keep a diet that does both. It's a catch 22 where you will not see major weight loss, nor major muscle gains, but you will get a little of each....and I say "little".
And therein lies the challenge... it's mental, and emotional.
You're going to wonder what the point of staying on this program is when you don't see much result.
You're going to blame your body and be disappointed.
You have to forget the time-frames and commit to the idea that if you stick with it, that *someday* it will pay off and be completely worth it. Make that decision and never look back.
Change your diet and exercise because you feel joy in doing in, not because of changes in your appearance. Love the feeling of working out if it never did anything for your appearance. Run Forrest Run!
There are things that can help, but with or without them, nothing is going to work if you don't change your brain first. Accept the suffering...embrace it...use it.
Look in the mirror and decide, then stop looking and get to work if your decision is to never go back to that body.
It will happen when you least expect it.
Regards