Sony Xperia Z3 compact echo during calls with speaker

When I turn on the speaker, the other party can’t hear anything intelligible because of the echo. Looking at other posts on this forum, it seems like this is a bug in the software. Are there any fixes for it? I am using e-0.15-q-20210312105636-dev-z3c

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

That is quite an old version. Later versions - which may fix the issue - are available for download at
After installing, you should find that future updates become available ‘Over the Air’ (OTA) using the Updater app