Okay so after a bit of experimenting, I've found this happens because of the @rollup/plugin-node-resolve plugin.
When Rollup needs to bundle packages from node_modules, this plugin will mess up the directory structure of our output. In this case, it's bundling tslib (you can see this under node_modules in build).
To solve this, you can:
Add tslib to the external field in rollup.config.js,
Add it to peerDependencies in package.json (This will prevent tslib from being bundled because of the peerDepsExternal plugin.)
I've updated the branch without the @rollup/plugin-node-resolve plugin which has fixed the issue. The downside of removing this plugin is that our bundle won't be able to benefit from Node Resolution Algorithm