How to stop WordPress returning 404 on paginated pages after using add_rewrite_rule()?

You get a 404 because you use the wordpress paged query var, and therefor wordpress tries to locate in the main query that page for that user, and if the user is not an author, or just havn’t published anything, there will be no posts for that page and wordpress will set the headers to 404.

Easy solution, make additional query var for your own paging.

Thinking a little more deeply into it… you will probably want to use the status_header, called from https://developer.wordpress.org/reference/functions/status_header/ in any case to modify the status header being sent, as there might be cases in which the user pagination gives empty results while the main loop will find something.

The tricky part is to know what should be the status way before any output is done, therefor waiting to get to template usage is too late and needs to be done when the main query is being “computed”, so probably at pre_get_posts filter, even you do not need to change anything in the main query.