Tax is charged on retail price for the purpose of correct accounting. GST has to be posted under the correct head.
Even the goods sold at MRP have GST charged separately but the total sum charged stays below MRP. In the case of discounted price too this procedure is followed. If a shop keeper has put a banner of 10% discount it can be seen that the total price after tax will be less by 10%.