For some reason the TV would flicker periodically as if unable to resynchronize to different video signals. This would happen at the end of a Netflix movie.
After months of fiddling it turned out that a setting required for Dolby Vision got turned off perhaps during a firmware upgrade (who knows how).
The setting is required to make the Sony and Apple TV work is on the Sony the following setting must be set:
Settings : Watching TV > external inputs > HDMI signal format > Enhanced Format