How to override Users-Permissions on V4

The solution is to modify the file /strapi/src/extensions/users-permissions/strapi-server.ts. The original source could be found inside users-permissions inside node_module. After update, run npm install to update.