Why was my position closed at the price, which was not on the chart?

The charts in the trading terminal are built based on the Bid price, but only long (Buy) positions are closed at the Bid price. Short (Sell) positions are closed at the Ask price.

As a result, your short positions will be closed at the price that is not displayed on the chart until you enable showing the Ask line in the chart settings.

In MetaTrader terminals, it can be done in "Charts" -> "Settings".