Let me clarify as i missed a word in my original post.
Deactivating WP dark mode removes all instances of WP dark mode widget, so when reactivating the plugin the Dark mode widgets that i put in before deactivating no longer remain.
I use Elementor. I put that code into post option > HTML Template to Display on Posts. Then drag shortcode widget into post and put [lmt-post-modified-info] in that.