Is there a chengyu to mean "undeserved reward" or "undeserved luck"? Let's consider someone who sits on their buttocks all day, but, in spite of not working hard, gets rewarded anyway.
Some examples:

a particularly lazy coworker who gets a promotion/raise even if they did absolutely nothing to deserve it.

someone who is clueless about a specific task but somehow lucks their way to a satisfactory result (copy-pasting random code from the internet and obtaining a working program)

someone who doesn't mind deadlines but somehow doesn't get burnt when the day of reckoning comes (forgetting to file the tax declaration, but not getting investigated by the tax authority)


These examples might be not entirely related, as undeserved reward and undeserved luck are not exactly the same thing.
However I wonder if there's a chengyu to express such a thing.
a particularly lazy coworker who gets a promotion/raise even if they did absolutely nothing to deserve it.


It is 無功受祿 or 竪子成名


If it was you who get the undeserved reward, you can use 受之有愧: as a self-humbling respond.

~

someone who is clueless about a specific task but somehow lucks their way to a satisfactory result (copy-pasting random code from the internet and obtaining a working program)


It is 歪打正着

~

someone who doesn't mind deadlines but somehow doesn't get burnt when the day of reckoning comes (forgetting to file the tax declaration, but not getting investigated by the tax authority)


you can call it 大難不死，福大命大 or 時辰未到 (time for the karma to take effect has not come yet/ not the time to die yet )

不勞而獲:  'to succeed with no effort' doesn't state a reward someone obtained is deserved or not. (you can get a reward with no effort by working smart) therefore not included in my answer

Is there a chengyu to mean “undeserved reward”

無功受祿 fit the bill. (clearly stated the reward is undeserved)