Without a keep rule R8 inlines EdgeToEdge.enable into onCreate and renames the class, so the console's DEX scan finds the deprecated framework call but not the recommended AndroidX call; with the keep rule the symbol survives.
Android

Play Console says ‘Edge-to-edge may not display for all users’ because R8 inlined enableEdgeToEdge — keep the class

Play’s edge-to-edge warnings come from a static scan of the DEX. R8 full mode erases the enableEdgeToEdge call it looks for; a one-line keep rule puts it back.