500 calories at 3 months seems to be a bit on the low side. If you are doing a lot of cardio, that can have the effect of slowing down your metabolism. Our bodies are not designed to lose weight, they are designed to protect weight. The surgery gives us some weapons against this by temporarily resetting some hormones, our microbiome, and of course some intake restriction. However, our genetics still see calorie restriction and high cardio as signals to slow our metabolism to keep us from starving. It is a natural thing that occurs. Some people experience an more aggressive effect than others.
Strength training can be more beneficial in that it protects against muscle loss and also helps your metabolism. Ideally, you'd want to maintain a 3:1 fat to muscle loss ratio, and you can't do that with cardio. Exercise overall isn't very beneficial for weight loss, and as I mentioned if you are doing a lot of cardio it can actually slow your metabolism down. Exercise has many other health benefits for you heart, mind, mobility, etc. but it generally will only net about 4-6 pounds of extra weight loss per year, for most people. Resistance exercise and keeping your metabolism humming would benefit you more.
What you eat is also important. A wide variety of plants will help your microbiome boost your metabolism, improve immunity, and balance hormones. It doesn't mean you need to be a vegetarian, it just means have small amounts of many different plants to give your gut bugs a very diverse source of fibers, which they feed on. This has many benefits to overall health, weight loss and weight maintenance when you reach your goals.
Another problem is, doctors don't get that much training in nutrition, but a lot of them think they know enough and they give outdated advice. They also tend to give all of the patients the exact same advice, which isn't great either. Each person has a different microbiome, reacts to various foods differently, and has different experiences along this road. While you'll see many people say "follow your doctor's advice" I would make a caveat that after 3 months or so, you should start discovering what foods your body responds to the best (in addition to a diversity of plants). You may find that the doctor's recommendations for what you should be eating just isn't right for you. I'd refer you to the Dietfits randomized clinical trial by Stanford that found that compared low fat vs. low carb diets. The results were statistically identical, but the most interesting thing is, many of the subjects involved didn't lose any weight and several gained weight, even though they were eating the same foods and same volume as other people on the diets. This happened in both the low fat and low carb diets. Why would this happen? We don't all process food exactly the same way. There is no single diet to rule them all, which is why I recommend trying a few things (slowly of course) to see what works for you.
You might try adding some additional calories and reducing your cardio for a while (either one or the other, or both). Unless you ad a whole ton of food, you'll still be in a calorie deficit.
Lastly, even without the scale moving during this time, good things are happening inside your body. If you haven't taken measurements, do that now and then measure again in a month. The scale isn't always the best way to measure success on this journey.
You aren't doing anything wrong, and if you stick with what you are doing, eventually, your weight will go down. I would just consider that you don't have to do exactly what you've been doing as long as you make good food choices, stay hydrated, maintain a calorie deficit and a bit of resistance exercise, you will totally reach your goals eventually.
You may ask why my advice is better than your doctor. Maybe it isn't, but I've spent hours upon hours and days researching the latest nutritional and bariatric studies, and I'm confident in what I've learned. That being said, these are just suggestions, and every person's journey is unique, so take any advice with a grain of salt before you jump in.
As I said above, you aren't doing anything wrong. Almost all of us go through stalls in this journey. Sometimes those stalls can last for days, weeks or even months, but over time most of us get to where we want to go. You can to.
Best wishes!