I found this solution
library (tidyverse)
my_data_2017 <- tibble(Var_1 = c(900, 1500, 350, 1200, 750, 100,125,250,300),
Gender = c("W", "W", "W", "M", "M", "W", "W", "M", "W"),
my_weights = c(2.2, 3.1, 8.2, 4.2, 5.3, 6.8, 12, 25, 1))
my_data_2018 <- tibble(Var_1 = c(850, 1000, 370, 1000, 600, 50,15,250,300,500,100,15),
Gender = c("W", "W", "W", "M", "M", "W", "W", "M", "W", "W", "W", "M"),
my_weights = c(2.2, 3.1, 8.2, 4.2, 5.3, 6.8, 12, 25, 1,2.5, 1.2, 1.1))
my_data_2017$Gender <- replace(my_data_2017$Gender, my_data_2017$Gender == "M", "M_2017")
my_data_2017$Gender <- replace(my_data_2017$Gender, my_data_2017$Gender == "W", "W_2017")
my_data_2018$Gender <- replace(my_data_2018$Gender, my_data_2018$Gender == "M", "M_2018")
my_data_2018$Gender <- replace(my_data_2018$Gender, my_data_2018$Gender == "W", "W_2018")
my_data_new <- union_all(my_data_2017,
my_data_2018)
And here is the plot
my_data_new %>%
ggplot(aes(Gender, Var_1, weight = my_weights, fill = Gender))+
geom_violin(color = "black", scale = "count")

The problem now it´s I want to change ther order and the colors:
1st W_2017, 2nd M_2017, 3rd W_2018 and last M_2018.
And grey color for W_2017 and W_2018 and white for M_2017 and M_2018