If you hit a fireball directly at someone it will credit you for the kill, However if you hit next to them or they are otherwise hit by the fireball but not directly you will not be credited for the kill on the player.
This was checked using the playerKillCount scoreboard so it is possible the issue is with that and not the credit itself, this was only checked as players against players but could also be the case with other entities.
Pretty sure code analysis:
In
LargeFireball#onHit, the call tolevel.explodepassesnullto the entity parameter instead ofthis. As a result,Explosion#getSourceMobcan't find the fireball, nor its owner. Contrast with Primed TNT, which uses a similarexplodecall but does pass itself in.The fireball still works for direct hits because
onHitEntitypasses the fireball entity to thehurtdamage source context.