This is how spot grid works. If it sells it sells with profit.
It's not buying the same thing at the same price, it's closing a cycle with profit, for example, selling 0.10 BTC with 2% profit, and then, at the same price, it buys 0.01 BTC and starts a new cycle.