App.css is not added to editor when 'yarn dev' is runnig

I’ve managed to load app.css into the editor base on this post:

The style is applied to both editor and front-end after I run yarn build. However, when I run yarn dev, the style is only applied to front-end until I run yarn build again. Presumably, it’s a issue related to how the hot-reload script injects the CSS?

Is there a way to apply the css when I am running yarn dev?

Other than enabling FSE, the following is the only piece of code added to setup.php

add_action('after_setup_theme', function () {
    $relAppCssPath = asset('app.css')->relativePath(get_theme_file_path());

app.css I used for testing

* {
  @apply border border-red-500;