The version we tested first and discovered all that was the one we had copied from Disco.
That did not yet have dh-compat = 12 set.
So it makes sense to be affected.
Then later on this was made part of the merge for Ubuntu Eoan where - now being dh compat level 12 - it would no more be needed.
I retested a revert of the sysV script drop, built with dh=12 and the 12.1.1ubuntu1 that is in Eoan. Now things work as intended.
Just as I have found in my tests the default template in dh compat 12 now has the sections for dh_installsystemd/12.1.1ubuntu1 and dh_installsystemd/12.1.1ubuntu1 now in reverse order than before. And we already know from my experiments that this fixes the issue.
I found the reason for my confusion.
The version we tested first and discovered all that was the one we had copied from Disco.
That did not yet have dh-compat = 12 set.
So it makes sense to be affected.
Then later on this was made part of the merge for Ubuntu Eoan where - now being dh compat level 12 - it would no more be needed.
I retested a revert of the sysV script drop, built with dh=12 and the 12.1.1ubuntu1 that is in Eoan. Now things work as intended.
Just as I have found in my tests the default template in dh compat 12 now has the sections for dh_installsyste md/12.1. 1ubuntu1 and dh_installsyste md/12.1. 1ubuntu1 now in reverse order than before. And we already know from my experiments that this fixes the issue.