"Lock being held by different context" with critical_section::scoped_lock

Documentation says critical_section::scoped_lock is "a non-reentrant mutex which is explicitly aware of the Concurrency Runtime". Right, but why you cannot use it in a function that calls co_await? I have a function as below:

task<void> doSomethingAsync()
{
static critical_section criticalSection;
critical_section::scoped_lock lock(criticalSection);
auto one = co_await doSomethingElseAsync();
auto two = co_await doEvenMoreAsync();
// do something with two
}

And it looks like when the function returns I got "Lock being held by different context". The reason is the scoped_lock is created in a different thread than it's destructor being called. The solution is:

void doSomething()
{
static critical_section criticalSection;
critical_section::scoped_lock lock(criticalSection);
create_task(doSomethingElseAsync()).then([this](auto one)
{
return doEvenMoreAsync();
}).then([this](auto two)
{
// do something with two
}).wait(); // sad but true
}