In headless mode, using UiPath actions to click a download button within a UI loop tied to a stored label, the file download fails while standard interactions succeed.
i think its a sync issue in headless mode - maybe the button isnt fully loaded when clicked. try adding a short delay; i had similar probs and this worked for me. check logs too for any hidden clues.