Currently Ukraine and Russia are in peace negotiations. Isn't there a grave danger for both leaders to be assassinated during these negotiations?
What measures would each side take to ensure the safety of the negotiating party?
It is rare that the leaders of warring parties themselves engage in negotiations, especially at the early stage. It is usually done via representatives - professional diplomats and military men, who may have different levels of authorization/flexibility in making concessions. The leaders usually appear in person at the very last stage, when it comes to signing the agreement and the photo ops.
Negotiations without preconditions
This is done this way not only for reason of security, but also because a word of a President or otherwise highly ranked official carries more weight and can be easily misinterpreted with unpredictable consequences. For example, this is why the idea of negotiations without preconditions among such diverging partners as, e.g., US and North Korea, is generally frowned upon: the other party may draw significant propaganda benefit from simply having engaged in negotiations at a high level, without making any concessions. This is pretty much John Bolton's view of the results of Trump's negotiations with Kim Jong-Un (some rounds of their negotiations ended without issuing a joint declaration, which pretty much signifies failure to achieve any progress).
The Trump-Kim negotiations are also an example of the possible security arrangements: one of their meetings was held in the demilitarized zone, where neither Americans nor North Koreans could have decisive superiority to carry out an assassination or kidnapping. The other meeting took place in Singapore, which is relatively independent from either country.
Mandate for negotiations
Negotiations via representatives require that these representatives are authorized to make important decisions, without having to consult at every point with their superiors - from being simply cumbersome, such consultations may simply betray some of the things that should remain secret - e.g., which issues really matter and which do not. A well-known example of negotiations without mandate is the secret negotiations between Johnson and later Nixon administration with North Vietnamese during the Vietnam war. The Hanoi representatives didn't really have any mandate, but carefully misled the American side, knowing that protracting the war works to their advantage.