I have discussed this issue with another experienced Joomla extension developer, and wer have concluded that the strange SEF URL conversion is the result of the new SEF routing in Joomla 4. As SEF urls are created with reference to the alias of the menu items the article is associated with, if the article is not assigned to a menu, then a SEF url cannot be created (the SEF url is not created from the article/category alias).
One solution suggested was to a revert to a Joomla 3 style of SEF URLs. To do this go to Content -> Articles and click on the Options button, then on the Integration tab, and set the Remove IDs from URLs to No.
Another more complex solution, but one that guarantees full SEF urls, is to create a hidden menu and assign the articles to it. The menu would not show up in the site layout, but would create correct SEF urls for each article assigned to it.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.