I found what was causing the problem!
When passing the link from the controller to Blade, Laravel (probably for security reasons) was modifying parts of the link, e.g., changing https:// to https%3A, which caused the error.
Instead of generating the temporary URL in the controller, I now do it in Blade:
{{ Storage::disk('b2')->temporaryUrl('d5443f7e-a109-443d-b4c0-48af21562485.jpeg', '+5 minutes') }}
and everything works!