What if some attacker forks blockchain from height 1 with a constant difficulty 1?
The accepted blockchain is the one with the most cumulative difficulty (i.e. the one which requires the most work to produce), not the longest. Nodes will not even accept a chain which has less than some minimum work required, set in the code, to stop such an attack from happening on newly synchronizing nodes who are not aware of the main chain.