WP 5.5, child themes, customizer and a weird cache issue

In WordPress the current theme and parent theme are stored in the database, as the template (parent theme) and stylesheet (child theme) options in wp_options. These are set when you activate a theme based on the activated theme’s directory name, and the Template: header of the theme’s style.css, if it exists.

These options are what’s used to determine which directory to load files from, such as functions.php, and any files loaded with get_template_directory_uri() etc.

Since the parent theme is set when the child theme is activated, if you try to change the parent theme by editing the child theme’s style.css after activating it, the parent theme will not change because the database still has the old value. You need to deactivate and reactivate the theme for any change to the parent theme to be recognised.

That covers points 3-8. Regarding the error in point 2, the JS error is almost certainly just caused by the PHP error. Judging by the line number, the PHP error seems to be being thrown by a use of get_theme_mod() with a default value (the second argument) that contains %s in it somewhere. If this is present then it’s treated as a sprintf string and passed the parent theme and child theme URIs for some reason. It seems that if too many %s are present this will throw the error you are seeing. This line from the documentation might provide a clue:

If the modification name does not exist, then the $default will be
passed through sprintf() PHP function with the template directory URI
as the first string and the stylesheet directory URI as the second
string.

I honestly have absolutely no idea what on earth this is for, and can’t find any mention of, or discussion about, this behaviour.