AIUI, it's not currently possible to edit webhook messages via discord.py. Historically this has been due to Discord limitations, but recently support for this was added: https://github.com/discord/discord-api-docs/issues/1544#issuecomment-708707645

I'd like to be able to edit messages sent via webhook; it would be nice to be able to delete them via the webhook API too, in the case where the bot user lacks permission to manage messages.
It's not possible to edit webhook messages via discord.py, and webhook messages can only be deleted if a bot user has the relevant permissions.
discord.py should support the new webhook API endpoints for editing and deleting messages.
We're aware. There isn't a good way to implement it in discord.py's current state.
See this conversation in the discord.py Discord server.
Most helpful comment
We're aware. There isn't a good way to implement it in discord.py's current state.
See this conversation in the discord.py Discord server.