Hey Gilles,
Welcome to Apple Support Communities. The information below may help.
Since you're able to temporarily resolve the issue by closing and opening the app, the issue appears to be software related. Make sure the MacBook Pro software is up-to-date by following the steps below.
Before installing new software, it's a good idea to back up your Mac.
To check for new software, open Software Update. It's in System Settings (or System Preferences), which you can open from the Apple menu in the corner of your screen:
* Choose Apple menu > System Settings. Click General on the left side of the System Settings window, then click Software Update on the right.
* Or choose Apple menu > System Preferences, then click Software Update.
f Software Update finds new software, click the button to install it, then enter your administrator password when prompted. During installation, your Mac might show a progress bar or blank screen several times, and you should avoid putting it to sleep or closing its lid.
If Software Update says that your Mac is up to date, then no new software is currently available for your Mac model. Software Update shows only software that is compatible with your Mac.
For future reference, the steps above came from this article: Update macOS on Mac.
If issue persists, test in safe mode. Safe mode helps determine whether or not the issue is related to software that loads as the Mac boots up. To boot into safe mode, follow the steps below.
1. On your Mac, choose Apple menu
> Shut Down.
2. Wait for your Mac to shut down completely. A Mac is completely shut down when the screen is black and any lights (including in the Touch Bar) are off.
3. Press and hold the power button on your Mac until “Loading startup options” appears.
4. Select a volume.
5. Press and hold the Shift key, then click Continue in Safe Mode.
6. The computer restarts automatically. When the login window appears, you should see “Safe Boot” in the menu bar.
The steps above are for Mac computers with Apple silicon. Steps for an Intel-based Mac, click here: Start up your Mac in safe mode. After testing in safe mode, restart normally and see if the issue is resolved.
This article has steps to go through if the issue continues in safe mode, and if it doesn't continue in safe mode: How to use safe mode on your Mac.
Take care.