This might happen if you initiate the short positions (selling options or futures) before initiating the long position (buying options or futures).
To avoid this while initiating a hedged F&O position, prioritize buying the long leg first to minimize margin requirements. This leg typically requires less upfront premium compared to short positions. Following the long leg with the short leg reduces the risk of encountering margin shortfall or paying the full margin for the sell trade.