PowerShell checks whether to log script block activities in ShouldLogScriptBlockActivity, which query Registry on windows to get the configuration via GetGroupPolicySetting. However, GetGroupPolicySetting does nothing on Unix, and thus script block activity logging cannot be enabled on Unix.
A potential fix is to make PowerShell checks against an entry in pwsh.runtimeconfig.json.