Necroing this here but I actually took a deep dive into the handbook text source code today and opened a PR for fixing the issue for good (hopefully).
In the meantime what actually ended up working for me was instead of using
{
"<domain>:<item|block>-handbooktext-<code-with-variants>": "<your awesome handbook text>"
}
to duplicate the domain like so:
{
"<domain>:<item|block>-handbooktext-<domain>:<code-with-variants>": "<your awesome handbook text>"
}
Yes, this inserts another colon into the path.. but that doesn't seem to cause any issues currently, so I will be using this method as a workaround until the issue is fixed.
Hope this helps at least some people out there who want to write handbook content for their mods.