Download URLs by definition give read-only access to the file, and are not affected by the security rules.
If you want to control access to the file, you should not generate a download URL and instead access the file through the SDK only.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…