Found the problem.
When a restore is made, a new timeline is created.
The problem is that when a restore is made, the default behavior is to restore the timeline used while creating the base backup, thus ignoring the new timeline together with the changes made after the restore.
The solution to this problem is to include the following line in the recovery.conf to always restore the last available timeline:
recovery_target_timeline = 'latest'
Best regards,
Pedro