I am using Lightroom Classic 12, but this error has been occurring for many versions. It seems to happen every time if the collection contains unpublished videos. Photos always work fine. Sometimes I can see in my Flickr account that the video has actually been uploaded, but it didn’t get added to the proper album. Other times, the video doesn’t show up in Flickr at all.
Regardless of whether Flick or Lightroom is at fault for the error, I think Lightroom should be able to handle it better. For example, instead of posting a modal dialog and aborting the whole publish process, it could continue publishing the other items.
Are you using the Flickr publishing plugin built-in to LR? It's not very well supported by Adobe. You might try this third-party Flickr plugin -- all of the author's plugins are very well supported (he designed LR's publishing architecture).