MySQL 5.5 vs 5.6,5.7 above same database same query but different output, limit have duplicated ID
Added ORDER BY up_posts.post_date DESC, up_posts.ID DESC no more duplicate result. Seem like we need to manually add this to avoid an unnecessary problem.

FYI. It applied to MySQL 5.6 and 5.7. 

See 8.2.1.16 LIMIT Query Optimization

If you want to order by primary key, you have to say so explicitly.