The positions are different because for the backtest with the cash allocation, when the strategy increases cash because of negative market sentiment, it will sell off some of the existing stocks to raise cash even if the existing stock is above the moving average. So in future when the strategy decides to reduce cash when market sentiment improves, it might not select the same stock. It will check the ranking of each stock based on the 3 month and 6 month returns and pick the best.
So it will be different from the backtest without the cash allocation option because this strategy will not adjust the cash allocation and will continue to hold onto stocks in the portfolio above the moving average.
Hope this helps! Let me know if you have further questions.