there is absolutely a possibility the part you got is not Spen compatible, OR that the connection was left loose. you really cant tell without being inside it, and fiddling around.
An electromagnetic field is generated from a circuit behind the screen. The S Pen picks this up and uses it to power itself and figure out its position relative to the screen. It sends this, along with information from the S Pen button and the nib at the end, back to the Note. This Pen Digitizer may not have been included with the screen you got, though with the new display technology, there is no way to tell without trying a new OEM Screen to see if it fixes the issue.
I would start by opening the device, disconnecting the screen related connectors, cleaning the board with Isopropyl, and reassembling. While the device is open, compare the new screen’s connectors and flex layout with the original, and note any differences.