Curiosity about applications in official repos

(In advance, I hope this could be the right section to write this on instead the pacman related section…)

More than one time, I noticed that some applications installed with pacman like Kdenlive, Gimp, Flowblade and others give some GUI issue; otherwise, if installed with flatpak, they work properly.
Does community related to linux distros modify the code of some apps before putting them into the official repos? If it is, is it to increase security or just to avoid some packages conflicts?

Arch usually is pretty close to upstream, while flatpaks are bundled with everything an application needs. That way it should be more consistent on different systems, because flatspaks always use the same basic libraries, etc.

So in arch you may need to change stuff that was already done or tweaked in flatpak packages.

This is a rather vague problem formulation as the actual scenario in each and every case may be more complex and also perhaps with adequate information there may exist solutions to these problems.

When it comes to modifying the code/configs of the applications: