Whenever I run blender --command extension build, I get the error: FATAL_ERROR: Not a Python package: missing "__init__.*" file, typically "__init__.py".
But I do have the __init__.py file. It’s located in the same directory from which I’m running the command.
I reproduced that message with __init__.py sitting right there in the folder. The check asks whether the file is in the set the build will package, rather than whether it exists on disk, so anything in a [build] section that drops it gives you exactly that error.
Two ways to do it by accident: paths_exclude_pattern = ["__*"], or a paths allowlist that forgets to name __init__.py.
That also explains your validate passing. On 4.5.13 and 5.2.1, validate said “Success parsing TOML” on the same folder build refused.
Worth knowing if you ever build on 4.2.23: it does not refuse. It made a 330 byte zip holding only the manifest and printed complete.