The answer is, it depends!
The rule of thumb for most of bosses is that you need to be online and logged in order to receive part of the boss loot (for example, daily bosses and such). The Piñata Dragon is an exception of this rule, however.
I can't confirm if this is intended or not, but my perception is that the rewarding system for bosses works differently in some cases. It is a curious question to think about, without a comnplete answer as far as I know!
If u get kicked from the boss but deal suficient amount of damage on him you will be able to open the reward box if you are online when the boss died. Now, if you are offline when he died, by the time you login in the game there will be no rewards for you.
It had already happened both situations with me.
TibiaQA Quick Tour design contestJanuary 06, 2020
TibiaQA Quick Tour Design - resultsFebruary 09, 2020
Character counter to prevent going over the character limit?February 12, 2020
Suggestion - TibiaQa on InstagramFebruary 11, 2020