the allays stopped generating silverfish even though the command shows their infestation effect still has more than 300 ticks left.
to reproduce the bug, summon 24 allays inside a solid block so they suffocate inside, use dispenser to give them splash potion of infestation while tick freeze. use repeating command block to teleport silverfish out so they don't die of cramming. /data get entity @e[]type=allay,limit=1] active_effects[].duration should show they have ~3600ticks of infestation effect. and /tick sprint 3300. when the sprint ends, they still should have 300gt of infestation effect left. however, they no longer produce any silverfish unless infestation is reapplied.
edit: the issue can be closed. it turns out when using the command the game will only get data from the oldest ally, which also happens to be the one hit directly by the dispensed potion. so it has 710gt longer potion effect than others. It's probably not a bug.
I wanted to upload the test world but the file is 15M, exceeding the 10M file size limit.