Flask not working with prefix in url

Flask app doesn’t work when i add prefix in panel serve

Minimum reproducible example:

import panel as pn
from flask import Flask

flask_app = Flask(__name__)

def hello_world():
    return 'Hello, World!'

def panel_app():
    return "# This Panel app runs alongside flask, access the flask app at [here](./flask/app)"

pn.serve({'/flask': flask_app, 'panel': panel_app}, port=5001, admin=True, prefix="/sub")

@Marc , any assistance with this issue would be greatly appreciated. I’ve been grappling with it for a week.