Is there some reason why Vaadin 24 is not using the specified theme? Its using some default light theme. You can even generate a new Vaadin 24 starter app and choose the lumo dark theme. When you run the app it doesn't use it. This was a working app in 23, just updated to 24. And I tried a new starter app, same problem.
Also, the gradle buildFrontend task now fails with licensing complaints for components that aren't being used, even in dev mode. That is broken. This problem began in version 23.
If you just need to see some code:
@Theme( value = "myapp", variant = Lumo.DARK )
public class Application extends SpringBootServletInitializer implements AppShellConfigurator {
// the usual stuff
}