Capital gains are taxed at their own flat rates (STCG 20%, LTCG 12.5% above ₹1.25L) and are handled separately in both regimes. The 87A rebate does not apply to them.
These only reduce tax under the old regime. The new regime ignores them (except the standard deduction, which is applied automatically).