This is a classical use case for external masks created with a suitable tool - in this case, GIMP.
Start with a neutral rendering of the RAW file. Export as a PNG. Open with GIMP. Activate the Fuzzy Select tool. Set the selection mode to Composite and the threshold to 8.0. Click a few times on various parts of the sky. All that remains is to remove holes from the selection, fill it with white and the rest with black, save it, and use it as an external mask.