I am using Audacity 2.3.3 on Kubuntu 20.04 from the repository, but I am not sure that this problem is specific to either the version of Audacity or Linux.
I found the same problem described in the following two forum posts (the first references the second):
https://forum.audacityteam.org/t/audio-does-not-play-completely-cuts-off-early/23288/1
https://forum.audacityteam.org/t/playback-cuts-the-end-off/18884/1
As mentioned there, when Audacity plays back a sound, it cuts off just before the last fraction of a second. Playing the same clip in another app (e.g. VLC) plays the whole thing to the end. This makes it very annoying for editing and exporting clips in Audacity where you need to cut the sound in the middle of bits of speech.
The solution suggested there is to install and run Jack, but as I was trying this and failing, it occurred to me that if other apps like VLC can play the sound to the end, then the problem must be with Audacity and not with the sound server.
Moreover, this must be a bug that has plagued Audacity for years as I recall having this issue long ago, and those other forum posts are 8 and 9 years old respectively.