Joli Table of contents is set to run last in most environments. It processed “the_content” filter hook at a priority of 10001 by default.
For some reason, if another plugin runs “the_content” filter at a higher priority than 10001, it may compromise the table of contents output. In this case you can set the priority to a higher number to make sure Joli TOC runs last.
add_filter('joli_toc_the_content_filter_priority', function($priority){ return 25000; });