Thanks for the additional information.
I have several thoughts as to why she might be behaving as you describe.
1. This can actually be normal behavior for a lot of cats. Since you've only had her for four months and she was a rescue, it may have taken her this long to feel completely comfortable in her new home so she's engaging in "normal" cat activity.
I personally suspect that these cats think they're going to miss something so they keep changing their minds about where they want to be.
It can also become learned behavior over time so it's something that she may continue to do.
2. It's possible that she's feeling a little threatened or uneasy about the cat in the garden or by the noise of construction across the street. She may want to reassure herself that she still has a safe place to which she can retreat or escape if she needs to.
For all the years that I've had cats, I've never had an outside cat flap so typically I've had to act as the doorman (or person) when my cats have asked to be let in and then out again in a short period of time. When my cats behave this way, I ignore them.....they generally become distracted by outdoor activities (there's always so much to do out there) and go on about their day.
I'm assuming that she eventually stops the behavior because she gets distracted by the multitude of interesting things going on outside or if she stays inside, she may decide it's time to take a nap.
But, if you were wondering if her behavior was secondary to a medical issue, I can assure you that it's not. It's basically a cat being a cat and one of the many reasons why they are so endlessly interesting.
I hope this helps. Deb