This is because the "each" variable from EL is only available during the component creation phase,
While data binding is parsed during the event phase, meaning that EL variables like "each" are not accessible at that time.
If you want to differentiate each button's calling, please change to use <forEach> component and create a common command like @command("invokeMethod") and pass a parameter.
For example:
<forEach items="${vm.indexes}">
<button label="Button ${each}" onClick="@command('invokeMethod', param=each)"/>
</forEach>
Thanks