I think there is a bug in the endpoint to replace topics of a repo.
only the owner of the repo can replace the topic. The logged in user who has the maintain and admin rights are not able to replace the topics with the right scopes. It gives them Status:404, NOt Found message.
But user can manually replace topics.