"cannot parse response" error in couchbase-lite from replication to / from Sync Gateway

Couchbase-lite occasionally throws the following error for push/pull replication to/from Sync Gateway:

Error Domain=NSURLErrorDomain Code=-1017 \"cannot parse response\" 
UserInfo={_kCFStreamErrorCodeKey=-1, NSUnderlyingError=0x281c7fe40 {Error Domain=kCFErrorDomainCFNetwork 
Code=-1017 \"(null)\" UserInfo={_kCFStreamErrorCodeKey=-1, _kCFStreamErrorDomainKey=4}}, 
_NSURLErrorFailingURLSessionTaskErrorKey=
LocalDataTask <28CF39CD-C435-4DA1-AAAF-C28FACB61F83>.<185>,
 _NSURLErrorRelatedURLSessionTaskErrorKey=(\\n    \"
LocalDataTask <28CF39CD-C435-4DA1-AAAF-C28FACB61F83>.<185>\"\\n), 
NSLocalizedDescription=cannot parse response, 
NSErrorFailingURLStringKey=https://sync.********.net/db/_revs_diff,
 NSErrorFailingURLKey=https://sync.prod.union.union-pos.net/db/_revs_diff, _kCFStreamErrorDomainKey=4

Endpoints that result in such error are:
db/_revs_diff
db/_bulk_get?revs=true&attachments=true

The error is not consistent and overall replication works, although that might result in delayed replication from SG to Couchbase-Lite and vice versa.

Has anyone experienced this issue or have any knowledge on what could be the cause for this?

Stack:
Couchbase-Lite: v1.4.4; iOS (14.5.1, 14.6, 14.7. 14.7.1, 14.8)
Sync Gateway: v2.1
Couchbase Server: v6.5.0 build 4960

Have you checked out our CBL 2.x Couchbase Lite on Swift | Couchbase Docs? 1.x is EOL.