Technically the port can be changed in the file
C:\Users\userName\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\config.json
However the communication between Power BI Service and the visual server seems broken when using a port other than 8080.
So, to avoid the port comflict, develop custom visual on a dedicated dev machine or change the port for the process that is occupying port 8080.