The example in playground defines the template for second render using the stored template name
const finalR = await jsreport.render({ template: { name: req.template.name }, data: { ...req.data, $pdf: p, secondRender: true } })This won't work in your case, because you don't persist templates. What you need to do is change the script to pass all template props to the second render.
const finalR = await jsreport.render({ template: { ...req.template }, data: { ...req.data, $pdf: p, secondRender: true } })