I understand that you would like to identify the lungs in the CT scan image of people with Covid19 disease with accuracy and to fill in the gaps shown in the image. I would suggest you look at the link for filling up the gaps in the image here--
and also try different values for thresholding to see if that works.
Refer to the following link for more details of Segmenting lungs--