Taxation on stock trades and dividends - Tax return

Does anyone have experience or knowledge about how the tax authority views a situation where I sell a stock on an AOT at a loss and buy it back at roughly the same price and time on an OST?

With AOT, the sale wouldn’t qualify for deductions, but does it matter that the lot is bought into an equity savings account?