Seeding the code alone isn’t sufficient to reproduce the same values, if the calls to the pseudorandom number generator differ.
Even if you don’t use a specific layer in one approach, it’ll be initialized, and thus the PRNG will be called, which will then change all further calls into it.