I can't say this happened to me before (but also don't do qPCR all the time).
In principle it should be fine to add the template to the side of the well, since this also lets you visually confirm that you did add the template. However, if you are having problems do consider adding the template to the liquid.
As another way to avoid this problem I would try to first put the adhesive foil lightly on top and then push it down/fix it with something sturdy that has a straight edge (there are special plastic things for this, but a tip-box can also work).