This is classic needle in haystack issue. Larger context windows make precision (especially with variable names) worse. Have you tried setting the context window smaller? 1M by default is a scam.