I have this issue loads of times, but not always
my code looks like this (simplified)
Dim ret =mycontext.Set(of Sale) ret = ret.AsNoTracking