Found the answer 😀 Link below, solution 2
I guess I almost had this solution, but I was using NextResponse.redirect() instead of NextResponse.rewrite(), also I like the approach of using decodeURIComponent() versus .replaceAll().
NextResponse.redirect()
NextResponse.rewrite()
decodeURIComponent()
.replaceAll()
https://stackoverflow.com/a/79212001/248756