How to replace SVG folder icons?

"Hello everyone, I’m facing a strange problem. I want to use my custom SVG icons for files and folders. When I try to replace the icon “folder.svg” and other folder icons, it simply doesn’t work; the icons remain the same, the default ones. This issue persists whether I create a theme in themes/customtheme or edit these folder icons directly in core/img/filetypes. However, if I attempt to replace, for example, the “logout.svg” icon in core/img/actions, it works fine. Any ideas on how to edit these icons? I suspect these icons are generated and not taken from the img directory, but how can I use my custom folder icons?

Operating system: Ubuntu 22.04.4 LTS
Nextcloud version: 29.0.2"