The ability that the spell gains as Rivaz’s last ability resolves continues to apply to the permanent that spell becomes after the spell resolves, even if it stops being a Dragon or stops being a creature.