Hi there,
no, neither the theme or WP has any function for this.
And Favicons can be a pain at the best of times.
For this requirement i know of 3 approaches:
1. The method you linked to, which if possible is probably one of the most reliable as the styles are embedded in the SVG.
2. Methods using Javascript to swap the images….
3. Adding 2 x separate favicon links to your site and using media support to swap them.
Options 2 and 3 are listed here:
https://joyofcode.xyz/dark-mode-favicon
For #3 you could try:
1. DO NOT add a favicon in the customizer.
2. Create a new Hook Element, and set the hook to wp_head
and set the Display Rules to Entire Site
3. Add the 2 links
like the HTML in the above post, and swap out your URLs for your 2 images eg.
<link
href="the_full_url_to_your_image/favicon-light.png"
rel="icon"
media="(prefers-color-scheme: light)"
/>
<link
href="the_full_url_to_your_image/favicon-dark.png"
rel="icon"
media="(prefers-color-scheme: dark)"
/>