Also, logical replication does not replicate the sequence. If you add a record to a new database without changing its ID, it will be set to the primary key already in use, and the addition will fail.
To avoid duplication, reset the sequence to the maximum value of the current primary key. The following articles may be helpful
https://qiita.com/unarist/items/1ef370933d5745d9c336