Using leader election condition in fleet managed Custom Logs integration doesn't work

I have a fleet managed Daemonset of agents which are assigned a policy including the Custom Logs integration. I want to collect logs which are duplicated across all nodes, so I'm only interested in one of the agents shipping the logs. The only "correct" way to do this seems to be to use leader-election.

In the configuration editor for the Custom Logs integration, I've added the following custom config which I assume will enable log shipping for the leader agent and none of the others:

condition: '${kubernetes_leaderelection.leader} == true'

However, it always disables shipping on all agents. I've tried different quoting styles, no quotes, and 'true', but neither of the variations work. When I set condition: true they all ship, and when I set condition: false, they're all are disabled.

Thoughts?

(I was asked to post here rather than Issues · elastic/beats · GitHub)

Any thoughts? If not, will create a Github issue.