Because both rewrites are scoped to / (i.e. all requests), the top one wins every time. Only one rewrite executes for each request. The regex is an additional check to the (unspecified) base path.
The matcher picks the rewrite with the longest matching base path, though.
Ditch the regex, it’s slow and completely unnecessary.
rewrite {
to {path} {path}/ /
}
rewrite /wp-content/uploads/edd/2019 {
# Uncomment this if it's absolutely necessary
# only to rewrite this index and not anything below it:
# if {path} is /wp-content/uploads/edd/2019
to /
}
Aha, thanks for the insight. I have updated my regex in the original question, forgot the most important parts. However, I replaced it with /wp-content/uploads/edd which works just fine – Thanks!