Hi Tom,
as far as I know, if you create web app through WAB in AGOL is not able to download. WAB have 2 types:
1. integrated in AGOL/portal that you have used
2. stand alone (WAB for Developer)
if you want to get the code, you have to use WAB for Developer instead of WAB on AGOL.