https://www.reddit.com/r/GalaxyS24Ultra/comments/1biuqvy/comment/kvsmog6/
You can force charge bypass all the time with this command:
adb shell settings put system pass_through 1
Do note, GOS will disable it, so you must disable GOS as well:
adb shell pm disable-user com.samsung.android.game.gametools pm disable-user com.samsung.android.game.gamehome pm disable-user com.samsung.android.game.gos pm disable-user com.sec.android.smartfpsadjuster
Remember that your phone will not charge at all when pass through is enabled. Unless it's powered Off. Therefore, you must disable pass through manually:
adb shell settings put system pass_through 0
This is also its default state.
This works on all high-end smartphones from Samsung since S22 series.
If you're on the go, you might want to use SetEdit to toggle that pref.
You can get ADB from Google. You may need Samsung USB Driver as well.
You can use Shizuku and aShell.
Shizuku is used to “elevate privileges” by connecting it as a wireless debugger. Then allow aShell access to that bridge and you can run ADB commands.
Alternatively you can use Shizuku and Termux using a built-in app called Rish (in Shizuku). There's a guide in there on how to do it.