Uncovered interest rate parity

For UIP, the expected change in future spot rate = interest country A - country B, therefore, if interest rate country A is greater than B, we would expect to see currency A depreciate against B.

However, I believe that if interest rate in country A is greater than B, we should expect capital inflow to A and outflow from B leading to appreciation of currency A.

Why does UIP yield different outcome to capital flow perspective?

Because interest rate parity isn’t intended to predict future interest rates, and it has no influence on them.

Interest rate parity is intended to prevent arbitrage opportunities.