diff --git a/src/Plugin/WebformElement/OptionsBase.php b/src/Plugin/WebformElement/OptionsBase.php
index 76a58e85..8ea4c09c 100644
--- a/src/Plugin/WebformElement/OptionsBase.php
+++ b/src/Plugin/WebformElement/OptionsBase.php
@@ -125,6 +125,18 @@ abstract class OptionsBase extends WebformElementBase {
         }
       }
     }
+
+    // If the element is #required and the #default_value is not in #options,
+    // we need to unset the #default_value to prevent the below error.
+    // 'An illegal choice has been detected.'
+    // @see Issue #2864729: Cannot delete files from draft submission with
+    // radios element required.
+    if (!empty($element['#required']) && isset($element['#default_value'])) {
+      $options_flattend = OptGroup::flattenOptions($element['#options']);
+      if (!isset($options_flattend[$element['#default_value']])) {
+        unset($element['#default_value']);
+      }
+    }
   }
 
   /**
