I've got other priorities and won't be making this mod myself, but in case someone else wants to pick it up, the respawn code is stored in the ServerMain class in VintageStoryLib.dll. VintageStoryLib does not have any source code available (as far as I'm aware).
To make a mod that does this, you'll need to create a Harmony Patch which transpiles that method to intercepts access to ServerMain.SaveGameData.DefaultSpawn and replaces it with the location the player died at.
(Edit) It might be easier to create a trigger when the player dies, which sets the global spawn position to the place where they died. However, that would have side-effects: the global spawn position is the coordinate origin - so (if you're playing with coordinates on), your coordinates will be relative to your last death location, with your body at (0 <y> 0). Additionally, if a new player joins in multiplayer, the new player would appear nearby to wherever the last death was.