Because as per C#, it is illegal to do so.
An await expression cannot be used in a synchronous function, in a query expression, in the catch or finally block of an exception handling statement, in the block of a lock statement, or in an unsafe context.
The thing is, if you call this code again and again, the await keyword would take the code back to from where it was called, and then you would come back to the same code execution, this threading of lock, unlock would cause a trouble in your code, maybe a deadlock, and basically you won't be able to get what you wanted to get.
Secondly, what Jon suggested on that answer is something like this:
lock (foo)
{
}
var result = await something;
lock (foo)
{
}
You would then execute the code that would alter the value of "foo", and then you will continue again.
Read Eric Lippert and Jon Skeet's answers to this thread,
c# - Why can't I use the 'await' operator within the body of a lock statement? - Stack Overflow[
^]