You've encountered an earlier engraving convention for how to show pitches that continue from a previous measure. If you look at more autograph and earlier published scores from the 17th and 18th centuries you'll find this. It is, essentially, what we today call a "tied" note. I'm sure you know how that looks. While you can attempt to discover a way to typeset this in Lilypond, perhaps the better course is to use modern convention unless you actually intend to use older conventions. But then, you'll likely need to include an Explanations page for people to explain this unfamiliar notation. I did a quick review of
imslp.org and sure enough the first score listed for BWV1004 shows this dot-as-tie (the Bach-Gesellschaft Ausgabe, Band 27 Breitkoph and Haertel from 1879) while the Neue Bach-Ausbgabe from 1958 shows the tied note.