Jelly, 8 bytes
ṣ0¬¬M¦j0
Try it online! or verify all test cases.
How it works
ṣ0¬¬M¦j0 Main link. Argument: A (list of Booleans)
ṣ0 Split at zeroes. This leaves a 2D list of ones.
¬ Negate each 1, replacing it with 0.
¦ Conditional application:
M Yield all maximal indices.
In lexicographical list comparison, a shorter list of zeroes is less
than a longer one, so this identifies the longest runs.
¬ Negate the items in those lists, changing zeroes back to ones.
j0 Join, separating by single zeroes.