You didn't say where you obtained Dolibarr, and what version of it.
However, your issue looks very similar to https://github.com/Dolibarr/dolibarr/issues/31816, which has been solved by this diff: https://github.com/Dolibarr/dolibarr/pull/31820/files.