Indeed melatonin supplementation causes tolerance development. The correct dose to avoid it is 0.3 mg [1].
Nevertheless I'm glad pharmacies sell pills with much higher dosage - you can just buy the 2-10mg pills, crush them and take the dose you need. I bet they would sell 0.3 mg pills for the same high price if they knew.
[1] https://slatestarcodex.com/2018/07/10/melatonin-much-more-th...