Your state refund is decreasing when you add investments because there is no tax withheld on investments, unlike a W-2.
Adding investments will increase your income, which increases your tax, but since you are not adding any additional withholdings to offset the extra tax, the additional money you owe is being subtracted from your state tax refund.