Xprivacy
With the MemoryGuardian (FOSS) app, you can set up to automatically clean the clipboard at any time you choose and you don’t have to use the adb and expose the device to vulnerabilities
I think that’s a better approach
AFAIK they removed the permission (was it a permission? Idk) to manage clipboard or it’s not like it’s used to be. I’m sure apps can’t control your clipboard itself but only the last copied text/element.
Doesn’t seem to work on the samsung keyboard. Any keyboard alternatives?
I recommend you use some keyboard that is open source and that doesn’t have an internet connection urgently. Samsung’s default keyboard has internet connection, full of spyware and collects metadata of everything you type on it. Simple Keyboard I think is a good option
TL;DR deny the permission via appops via ADB.
I use shizuku which allows for shell and hidden api access forother apps. That can be used to deny permission to other apps.
App-ops by the same Dev has a clipboard monitor that notifies every time an app tries to access.
It also allows per app denial