Perhaps take a look at this tutorial I put together that shows how to accomplish just this sort of behavior. It is using the GeneratePress theme along with the Elementor page builder as well as the Page Scroll to ID plugin, which among other things, does the active section highlighting ๐