Tasks shown "alive" in Instruments display even after they should have finished

In my TestApp I run the following code, to calculate every pixel of a bitmap concurrently:

private func generate() async {
    for x in 0 ..< bitmap.width{
        for y in 0 ..< bitmap.height{
            let result = await Task.detached(priority:.userInitiated){
               return iterate(x,y)

This works and does not give any warnings or runtime issues.

After watching the WWDC talk "Visualize and optimize Swift concurrency" I used instruments to visualize the Tasks:

The number of active tasks continuously raises until 2740 and stays constant at this value even after all 64000 pixels have been calculated and displayed.

Is this a problem with my code, Instruments or Swift?

Can you please provide iterate(x,y) and displayResult(result) function implementations?
Can you check if generate() returns after the loop has ended?