I don't think the way this problem is described matches what the solutions should be.
The test case that seems to be missing is when the duplicates are separated by a large gap.
Test case: [1,2,3,4,2,2,4,3,1]
Leetcodes expected answer: [1,2,3,4,4,3,1]
True answer, if all duplicates are removed: 
the title of this question is: Remove Duplicates from Sorted List II.
[1,2,3,4,2,2,4,3,1] is not a sorted list.
In order to ensure the order of the list under the premise, only need to compare the latter element and the previous element is the same
@Loatheb oooh gotcha, thanks! the question is much easier than I thought =D