In Spain it's very common to "grease and flour coating" to any baking mold or tray!
It is quite easy! Get some butter, apply it to the tray evenly, add some flour (regular flour works) and with your hands tapping on the mold or tray, make sure it gets evenly spread!
It will be easier if you see it by yourself! Below you can see very short videos!
For a cake mold
For a tray (I pasted the exact second as well).
So doing this will ensure that as the cookies grow and get flat, they will do on top of the flour nd won't get sticky. IT may seem a bit messy but ADVICE: if you spill some flour or whatever, clean asap. The tray will be easy to clean afterwords if sipped in water.
More or less something like this but with the tray! I'd definetly do this before using tin foil! I haven't found any "100% scientific based report on not using tin foil when baking", but definetly avoid using foil when cooking at high temperatures or cooking acidic foods.
Image from https://www.cocinadelirante.com/tips/como-engrasar-un-molde