They are called leafminers and you are right, the larvae tunnel around in the interior of the leaves.
Here's a thread where I wrote about them some (scroll down the page about half way)
https://www.helpfulgardener.com/forum/vi ... 49#p302849
Your garlic spray (or pretty much anything else) won't make a difference, because they are protected inside the leaves. You can just keep picking the affected leaves off.
Leaf miners are usually not a serious threat. Remember your "your tomato plants can have as much as 60% of its foliage affected with leaf miner without affecting the fruit or its growth."
Read more: https://gardenofeaden.blogspot.com/2009/
What you can do is put down heavy mulch (beneficial anyway). That helps keep the leaf miners from completing the life cycle, which they do by dropping out of the leaf onto the ground and pupating in the soil.