Until this is resolved our workaround is to be specific with the version of the task that we consume. See: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/tasks?view=azure-devops&tabs=yaml#task-versions
So until this is resolved all the tasks that fail we will be updating to use:
task: CopyFiles@2.246.0
instead of
task: CopyFiles@2
as that seems to be what our last successful builds were using since we spotted this.
With this solution it will also be much easier to test new releases without rewriting the yaml files later. This sadly doesn't work as well for Classic pipelines as through the UI you can only select 1.* or 2.* versions. For those more significant hacks through rest api would need to be used to force a specific task revision to be used.
Hope this helps