Hi Fred!
We’ve actually got a whole page of information pertaining to the leafminer life cycle and controlling the little buggers! Check it out here: https://www.planetnatural.com/pest-problem-solver/houseplant-pests/leafminer-control/
It should be mentioned that mature leafminer larvae overwinter in the soil. By getting them in the ground you are promoting their life cycle to continue. I would suggest the introduction of beneficial predatory insects such as the leafminer parasite (Found here! https://www.planetnatural.com/product/leafminer-parasite-miglyphus/) and perhaps a trap crop-insecticide pairing such as spinach to help lure the leafminers out of the lychee trees. I would suggest using either Azatrol or SNS 203 to injure or kill the adults. Both can be found here!
https://www.planetnatural.com/product/azatrol-ec-insecticide-azadirachtin/
https://www.planetnatural.com/product/sns-203-pesticide/
Hope this helps! Good luck!