Jelly, 1412 bytes
Œgœ-Q$LÐṀÆṃ'
Try it online!
Previous version – 14 bytes
ŒgŒQ¬TịƲLÐṀÆṃ'
Try it online!
How it works?
Œgœ-Q$LÐṀÆṃ' – Full program. Receives a list of digits as input.
Œg – Group equal adjacent values.
œ-Q$ – Multiset difference with itself deduplicate.
LÐṀ – Keep those that are maximal by length.
Æṃ' – Mode. Returns the most common element(s).
-------------------------------------------------------------------------
ŒgŒQ¬TịƲLÐṀÆṃ' – Full program. Receives a list of digits as input.
Œg – Group equal adjacent values.
ŒQ – Distinct sieve. Replace the first occurrences of each value by 1.
and the rest by 0. [1,2,3,2,3,2,5]ŒQ -> [1,1,1,0,0,0,1]
¬T – Negate and find the truthy indices.
ịƲ – Then index in the initial list of groups.
– This discards the groups that only occur once.
LÐṀ – Find all those which are maximal by length.
Æṃ' – And take the mode.