Suppose we have the following code inside the themes.xml file:
<style name="Base.Theme.MyApp" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
</style>
<style name="Theme.MyApp"/>
Redefine Theme.MyApp so it inherits explicitly from Base.Theme.MyApp.