I just want to give the information to whoever that could help.
I was trying to use DMS for Postgres to Postgres migration and even after migrating the sequences with the provided script, I was missing a few sequences. It took me quite a long time to find out that they were not migrated.
I did not figure out fully why they behave differently but I think this is because they are linked to identity columns.
SELECT d.refobjid::regclass as schema, a.attname as field, seq.relname as sequence_name
FROM pg_depend d
INNER JOIN pg_attribute a ON a.attrelid = d.refobjid AND a.attnum = d.refobjsubid
INNER JOIN pg_class as seq ON seq.relkind = 'S' and d.objid = ('"' || seq.relnamespace::regnamespace::text || '"."' || seq.relname || '"')::regclass
WHERE d.refobjsubid > 0
AND d.classid = 'pg_class'::regclass
ORDER BY seq.relname ;