The root cause appears that the Async Task retains a reference to the last used Continuation object even after the task is completed. In unoptimized/debug case, the test retains a reference to the completed Task and that effectively "leaks" the last used socket.
The test creates a number of Sockets for quick use, but does not explicitly dispose them. It is expected that once unreachable, the sockets will auto-dispose via Finalization.
The test is specially crafted to ensure that no hard references to the socket objects exist from the actual test code and disposal is observed via weak references to socket handles.
When runtime async is enabled, the last socket created does not auto-dispose and that causes the testcase failure.