You could probably do this with a Graph API request:
Update plannerTask - Microsoft Graph v1.0 | Microsoft Learn. I have not had any need to do this, but I asked Copilot and it says it should be possible to do this with a patch request through the Graph API. I don't have time to test this since it isn't something I see needing in the near future, but I did find similar questions to yours in the forums and none have a verified answer. If you can get it working, it would help a number of people.
This is what Copilot suggests but in plain text:
To remove all attachments from a Planner task using the Microsoft Graph API in Power Automate, you need to follow a two-step process. First, retrieve the current details of the task to get the @odata.etag value, which is necessary for the update. You can do this by making a GET request to the endpoint:
https://graph.microsoft.com/v1.0/planner/tasks/{task-id}/details.
Once you have the task details, use the PATCH method to update the task details and remove the attachments. This involves setting the attachments property to an empty array. The PATCH request should be sent to:
https://graph.microsoft.com/v1.0/planner/tasks/{task-id}/details
Include the If-Match header with the eTag value obtained from the GET request. In Power Automate, you can use the HTTP action to make these API calls. First, configure the HTTP action to get the task details, and then use another HTTP action to update the task details and remove the attachments by setting the attachments property to an empty array. This process ensures that all attachments are removed from the specified Planner task.